W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > January to March 2003

Re: how to square netscape 4 compatibility with css

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Thu, 20 Mar 2003 13:36:36 +0200 (EET)
To: "'w3c-wai-ig@w3.org'" <w3c-wai-ig@w3.org>
Message-ID: <Pine.GSO.4.50.0303201329040.10609-100000@korppi.cs.tut.fi>

On Thu, 20 Mar 2003, Chris Croome wrote:

> These days I set things up so that IE4.x and NN4.x don't get _any_
> CSS, and only better browser get the CSS.

That's one possible approach, but you might also divide a style sheet into
two parts, so that _some_ of your styling gets thru to NN4.x, too. After
all, it implements e.g. font-family correctly, and colors seem to work too
(when used by CSS specs).

> I generally use this hack to block these browsers:
>
>   <style type="text/css" media="screen" title="Screen style sheet">
>     @import "http://example.com/example.css";
>   </style>

There are several "Netscape 4 exclusion" tricks, see
http://css.nu/pointers/liam-tip.html
http://css.nu/pointers/point-tip.html
but you might easily end up with excluding more than you want. In
particular, the hack above makes everything in the CSS apply at most in
computer screen rendering only. Many of the features might make printed
copies more readable or more enjoyable, for example.

My favorite is to use
@import url(unsafe.css);
at the beginning of my style sheet and to put there anything that might
confuse poor Netscape 4 too badly. That way all my documents can contain
just a simple <link> reference to my style sheet.

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
Received on Thursday, 20 March 2003 06:36:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 19 July 2011 18:14:08 GMT