Jump to content

Applying styles to php code


jassikundi

Recommended Posts

Hi poeple, i'm kinda stuck on applying styles to my php code. I've applied styles to everything that can be displayed via dreamweaver's design interface and attached a css to some of the text. However how do I format text that is echoed? For example the code below:

 

[pre]echo "<h1>User Account Edit Success!</h1>";

  echo "<p><b>$session->username</b>, your account has been successfully updated. "

      ."<a href=\"main.php\">Main</a>.</p>";[/pre]

 

I would like to add a different colour and font. that's about it really.

 

Thanks.

Link to comment
Share on other sites

This is a CSS issue, not a PHP one, but you can do it like this:

 

echo "<p><span class="someclass">$session->username</span>, your account has been successfully updated.<a href=\"main.php\">Main[/url].</p>";

 

And then write out your CSS class rules for .someclass

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.