|
Posted by Rik on 05/08/06 11:18
KiwiBrian wrote:
> In a calender script in a web site I have a php file with the
> following typical table cell entry:-
>
> <td align=center width=$col6>";
> if($cweb[$i] != "")
> echo "<a href=\"http://$cweb[$i]\">$cweb[$i]</a><br>"; plus lots
> more within the td.
>
> Although I can use CSS on cells in the header row, it appears as
> though the echo element prevents me from applying an inline CSS style
> to this cell/td. Is this expected behaviour?
No, PHP makes a HTML page, the same css rules apply on your "generated" page
as if you'd written the whole thing in HTML yourself.
> Is there any way I can apply an inline CSS style to the cell?
So, the normal way.
> On a related matter, how would I apply a CSS style to the hyperlink
> entry in the above example?
Euhm,
td a{
color:red;
}
> I am reasonably familar with HTML and CSS, but am lost in this PHP.
> Also what is the significance of the \ after the a href=
It escapes the following ", else your string would end, and you leave PHP
searching for the (illegal) constant "http://$cweb[$i]"
Grtz,
--
Rik Wasmus
Navigation:
[Reply to this message]
|