Re: CSS versus Includes

From: Date: Mon, 02 Apr 2001 01:09:11 +0000
Subject: Re: CSS versus Includes
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-8102@lists.php.net to get a copy of this message
"Matt Braynard" <mbraynard@atlantech.net> wrote in message news:NFBBJICKALDCFFKLNBHIKEGNCMAA.mbraynard@atlantech.net... | When I asked the question, what I meant was should I use the includes to | hold page style details or a CSS file. And someone who understood that this | was not an apples and oranges situation but one of approach answered that | Netscape was not fully supportive of CSS and suggested includes may be the | way to go. Whether you link to an external stylesheet, embed a style block or declare the styles in-line is a matter for author management of the CSS property declarations. The use of includes or scripting the actual link, block or inline styling in the document does not matter a wit. Importantly, if the styling is included, the interpretation is still done by the client browser. Whether includes or in-document coding are used, the restrictions and bugs and failure to parse, where invalid markup or styling is involved, still apply. What I do notice, however, with some Nav4x browsers, that escaping the quotes on class names in printf() causes these browsers to sometimes escape the whole class declaration. eg. printf('<tr> <td class=\'id\' align=\'right\'>%s</td> <td class=\'lname\'>%s</td> <td class=\'fname\'>%s</td> <td class=\'logon\'>%s</td> <td class=\'logoff\'>%s</td> </tr> ', $myrow['id'], $myrow['lname'], $myrow['fname'],$myrow['logon'], $myrow['logoff']); The solution for some documents is to write as such <td class=id align=right>%s</td> How this will affect xml documents I am not sure Also with tables, if the data is being extracted from a database, as above, and the data in a particular field row is null, the td cell styling background will collapse with Nav4x browsers. This might be solved by a conditional statement inserting some content where the database row/field content is null, or constructing the database table with pseudo content, such as &nbsp; as the default for fields likely to have null content. Sorry, but my experience is that oranges are oranges and apples and apples are apples. Nice thought! but I do not think you can get out of browser non-compliance by using PHP. Tim Morris

« previous php.db (#8102) next »