Click to See Complete Forum and Search --> : styling up in php


calliepeck
02-05-2006, 11:33 PM
So I've found that I can include some css coding within php and it will work, while other things are just ignored. I'm having no luck finding any resources on this, so hoping someone might point me in the right direction.

Essentially, I just want my 'echo' results to be styled according to variable. $date should be blue and italic, $headline black and arial, whatever. I can get this to work (sort-of) inside a table, but I feel like I get into trouble with classes. Should I reference an external stylesheet for something so small?

Cheers.

gaston9x19
02-06-2006, 12:01 AM
What exactly are you coding? You should be able to use CSS as normal, whether it goes through the PHP engine or not. Does something like <?php echo "<div style=\"color: #00F; font-weight:bold;\">date</div>\n\n"; ?> work ok?

calliepeck
02-06-2006, 06:38 AM
works great, I was missing my slashes...stupid. Thanks!

gaston9x19
02-07-2006, 12:51 AM
My pleasure, good luck :)