Thanks, but how do I tell based on the version and type if css is
supported?
You're probably worrying about older browsers like IE and Netscape 4,
right?
As long as your document can be read/accessed without a stylesheet, you can
just serve NS 4 plain text. The way to do this is to use an @media that is
not screen, like @media all, or you could combine both @media all and
@media screen in the same stylesheet and include styling for NS in the
@media screen section.
For IE, there are only a few things to remember:
1. IE does not recognize hover on any element other than A
2. IE does not recognize display:fixed because the only element that IE can
fix in the view port is the background of the body element.
3. IE does not do well with fonts in ems. Use percentages instead, and you
should be fine.
The other thing you need to do, if you are not already, is make sure that
you are using a Strict Document Type Declaration (DTD), which will force
compliant browsers (IE among them) into standards mode. However, doing so,
you must make sure the markup is valid, otherwise the browser will still go
into quirks mode and possibly make a mess of the invalid markup.