0

I would like to know how to position string of php origin using css, I made a login form after logging in the users are directed to a dashboard where I would like to view their username in a particular location,

this is my code:

CSS

// font to decorate the username string
@font-face {
    font-family: 'chunkfiveroman';
    src: url('chunkroman/chunkfive-webfont.eot');
    src: url('chunkroman/chunkfive-webfont.eot?#iefix') format('embedded-opentype'),
         url('chunkroman/chunkfive-webfont.woff') format('woff'),
         url('chunkroman/chunkfive-webfont.ttf') format('truetype'),
         url('chunkroman/chunkfive-webfont.svg#chunkfiveroman') format('svg');
    font-weight: normal;
    font-style: normal;

}

#postioner
{
position:absolute;
left:100px;
top:100px;
}

PHP

<?php

session_start();
$_SESSION['var'] = $username;
?>

also I would like to know how to stlye the $username with the css font. :)

1
  • You style the form in html, not the php code. Commented Jun 29, 2013 at 8:04

1 Answer 1

1

You need to output HTML with an appropriate <link> to your CSS.

For example:

<?php
$username = 'Bob';

echo <<<EOT
<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <title>My Title</title>
    <link rel="stylesheet" href="mystyles.css">
</head>

<body>
$username
</body>
EOT;
?>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.