Reply to Re: Newbie query

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация