In need of help with php echo output css style

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
mhouldridge
Forum Contributor
Posts: 267
Joined: Wed Jan 26, 2005 5:13 am

In need of help with php echo output css style

Post by mhouldridge »

Hi,

I am trying to output the following code into css formatted text. Here is what I have, unfortunately it is not working....

Code: Select all

echo "<class=\"standard\"><b>Title: ";

               echo "<class=\"standard\">".$myrow['title']."";

               echo "</b><br>On: <i>";

               echo $myrow['dtime'];

               echo "</i><hr align=left width=160>";

               echo "<class=\"standard\">'".$myrow['text1']."'";

As you can see, I have tried this on the echo "<class=\"standard\">".$myrow['title'].""; ----- that doesnt do out though. I have also added the css link to the page just in case.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

css is an added attribute to an existing tag, it does not have a magical tag of it's own like you are trying to use. Try

Code: Select all

echo '<span class="standard">';

// your content here

echo '</span>';
instead..
Post Reply