[thelist] hiding CSS

Mark Limburg mlimburg at users.sourceforge.net
Sun Apr 14 22:35:01 CDT 2002


Howdy,

>>> I'm updating my site, and have a question about hiding CSS
>>> from old browsers.
>>> Until I saw what a mess MacIE4.5 made of the page, I was using
>>> the @import "stylesheet.css";

>> People may disagree with me, but for the exact type of problems you
>> cite, I thing using @IMPORT to give different CSS to different
>> browsers is a bad idea. Use JavaScript and document.wrote a link to
>> an external stylesheet.

> I'm one of those who will disagree with you.:-)
>
> What happens to the 10%-20% of users with no javascript? No
> stylesheets.
>
> Another problem is the number of forks required.  A comprehensive
> javascript browser-sniffer has to fork for platform, browser, & version,
> which is going to take multiple lines.
>
> Using import takes one line, and in its simplest form only requires two
> stylesheets, one of which can be very basic.

I prefer a deeper solution, that of using a reusable PHP object which
defines the stylesheet.  This allows me the option to import or directly
write the shylesheet into the page, as well as allow me to define more
than a few stylesheets if needed.

A good example is a basic CSS1, tricked out CSS1, and CCS2 sheets.

Oh, and I'm strill writing the object :P

^M^




More information about the thelist mailing list