|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
As you may guess, I am new to PHP and am experiencing some frustration with attempting to format data in a table. Here is my statement for the first row of the table, which contains the statement :
printf ('<td width=\"192\" height=\"14\" valign=\"top\" class=\"Header1\"><a href="%s">%s</a></td>', "$PHP_SELF?sort=dept_sort", "Department"); Problem is, the reference to the Class does not work. I get no errors, but the font does not get formatted as Header1. I have tried various iterations of this using <Span> outside of the <Td> tag to set the font, etc., but nothing seems to work. The font does not get set to the style in Header1. I have spent hours on this - can someone help me? Is there a better way to do this? Thanks! Marcie |
|
#2
|
||||
|
||||
|
Hi Marcie,
I have never really used CSS with PHP but I have a suggestion you might want to try. Rather than print it all in PHP try exiting PHP into HTML and then re-entering PHP, like so... PHP Code:
Just an idea
__________________
--------------------- -- SilkySmooth -- --------------------- Directory Share | Free phpLD Mods | Little Directory |
|
#3
|
|||
|
|||
|
It Works!
Thanks Ade,
Your solution worked just great! I'm finding that there are many different ways to do things in PHP! Marcie ![]() |
|
#4
|
|||
|
|||
|
marcie,
You might as well apply SilkySmooth's idea to both lines of code. Drop the printf. PHP Code:
as in PHP Code:
Hope this helps, Robert
__________________
Robert --- If it's hard, it's probably wrong. |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > Formatting Output in Table using Printf and CSS |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|