RE: [PHP-DB] CSS versus Includes
| From: | Steve Farmer | Date: | Mon, 02 Apr 2001 11:42:49 +0000 |
| Subject: | RE: [PHP-DB] CSS versus Includes | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-8133@lists.php.net to get a copy of this message | ||
Hi All,
You can also do ..
if(strpos($HTTP_SERVER_VARS["HTTP_USER_AGENT"], "Macintosh")):
$mysite_style = "mysite_mac.css"; /* MACINTOSH */
else:
$mysite_style = "mysite_win.css"; /*WINDOZE */
endif;
echo "<LINK rel=\"stylesheet\" type=\"text/css\" href=\"".$mysite_style."\" title=\"mysite\">";
So you can combines both browsers and OS's
Regards
Steve Farmer
At 11:31 AM +0100 2/4/01, richarda@askr.easysoft.com wrote:
Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline; filename="BDY.RTF" ;Creation-Date="Mon, 2 Apr 2001 11:31:14 +0100" One of the benefits to including a css (as opposed to LINK REL...) is that you can pre-process the CSS file with PHP. e.g. my_css.phtml: <STYLE> <!-- P ( color: <? echo $MyPHPColorSetting ?> }; --> </STYLE> or even more useful: if ($Browser='IE') {-- --------------------------------------------------- "Minds are like parachutes, they work best when open" Support free speech; visit http://www.efa.org.au/ Heads Together Systems Pty Ltd http://www.hts.com.au Email: hts@hts.com.au Tel: 612 9982 6767 Fax: 612 9981 3081include "ie.css";} else {include "other.css";} Hope this helps. _____ ~ Richard Allsebrook ~ Applications Developer and Webmaster Easysoft Limited, Thorp Arch Grange, Thorp Arch, Wetherby, LS23 7BA, UK http://www.easysoft.com <http://www.easysoft.com> - http://www.cinema.com <http://www.cinema.com> "A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila."