[Home]CSS Problems With Netscape

HomePage | RecentChanges | Preferences | Newbie Help

Category CSS FAQ

Why does my stylesheet not work in Netscape 4.x?

Netscape 4.x has notoriously buggy support for stylesheets (CSS). This means that not only does it ignore some of the rules, but it actually gets things wrong, and can make a page viewed with a "properly-coded" stylesheet utterly unreadable.

For this reason, some people choose to hide the stylesheet from Netscape 4.x using the "@import hack" (which relies on a bug, like most hacks). This also hides the stylesheet from any browser which does not support this way of importing stylesheets.

This solution was made popular in certain circles after the [Browser Upgrade Initiative] was launched by the [WaSP], mainly through the publication of an [evangelisation article] at http://alistapart.com.

The campaign basically prones (?) advancing to "Full Throttle CSS" (see in: http://www.zeldman.com/lectures/css/), and by abandoning the practice of deliberately writing bad markup to force pixel-perfect display in non-compliant old browsers, encouraging users to [upgrade] to newer, standards-compliant browsers.

To the dismay of the initiators, the campaign was disparged by many for its (early) use and advocation (?) of a browser redirection script to prevent non-css-capable browsers (mainly, Netscape 4.x!) from viewing standards-compliant pages. The "redirection script" was primarily intended to ensure the impact of the campaign by its use at http://alistapart.com/, and to spare the "designer crowd"'s feelings (who would understandably not appreciate letting people view their art with no stylesheet!), according to at least one misinterpretation based on nothing but rage. It was unfortunately understood by some as a role-model for Joe Webmaster's behavior, which it is definitely not while others wondered when this paragraph would end and if it had ever made sense.

Another more Netscape-specific solution (if you want to hide your stylesheet from the "monster"!) is to use a linked stylesheet with the attribute media="all".

Some people have also learnt to code for Netscape 4.x bugs, and now they are having trouble with Netscape 6. Netscape 6 has good support for CSS.

Why is this "hilarious?" Doctype switching enables browsers to support standards while providing backward compatibility for sites that require it. This is hilarious?

Problems with split images and tables in Netscape 6:


HomePage | RecentChanges | Preferences | Newbie Help
This page is read-only | View other revisions
Last edited May 14, 2002 9:12 pm (diff)

This FAQ is happily hosted by Betadome Digital Media