Justtechjobs.com Find a programming school near you






Online Campus Both


php-db | 2001041

RE: [PHP-DB] CSS versus Includes From: Rubanowicz, Lisa (lisa.rubanowicz <email protected>)
Date: 04/02/01

Hi there,
you can also do it this way using Javascript
<script>
                if (navigator.appName == "Netscape") {
                StyleSheet = "netstyle.css"
                } else {
                StyleSheet = "iestyle.css"
                }
                </script>
        
<script>document.write('<link rel=stylesheet type="text/css" href="'
+StyleSheet + '">')</script>

All the Best
Lisa

-----Original Message-----
From: richarda <email protected> [mailto:richarda <email protected>]
Sent: Monday, April 02, 2001 11:31 AM
To: mbraynard <email protected>; php-db <email protected>
Subject: RE: [PHP-DB] CSS versus Includes

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')
{
      include "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."

  _____

 

-----Original Message-----
From: mbraynard [mailto:mbraynard <email protected>]
Sent: Saturday, March 31, 2001 12:45 AM
To: php-db
Cc: mbraynard
Subject: FW: [PHP-DB] CSS versus Includes

I have found that includes work just about as well. Any suggestions on
going
with one or the other?