Netscape Four

From CSS Discuss

Jump to: navigation, search

This is a page about Netscape Navigator 4.x: a browser that has a harsh reputation for its extremely buggy CSS support and a tenacious customer base.

The harsh reputation is based on relatively poor implementation, not to mention bugs that kill the browser, rather than ignoring the styling. What's often overlooked is that Netscape 4 was the first browser to offer any appreciable support for CSS at all... And its bad support is largely due to a last minute scramble to switch from a proposed stylesheet solution (JSSS) to CSS.

The "tenacious" customer base comes largely from both a long lack of alternatives for *nix systems, and the slow-as-molasses upgrade schedule for academic systems... and perhaps more than a little anti-Microsoft sentiments.

Contents

Bugs

  • divs are as wide as their containing text rather than being as wide as possible - width:100% fixes this.
  • if you set a background colour without setting a border NS4 will only colour in the area behind the text, rather than colouring in the whole div.
  • NS4 applies a default padding of about 5px to the whole body, and you can only fix that with deprecated/invalid attributes in the BODY tag
  • If you define borders for many elements on one page (or for many instances of one class), the very buggy Netscape 4 versions, between 4.08 and 4.71, may crash.
  • won't let you override the default margin setting for Hn tags, Eg. H1 {margin: 0px;} has no effect on the bottom margin. recommended solution seems to be to apply a negative margin-top to the element that follows the Hn tag. You can set a class to all these elements to handle them in one go.

Tips & Tricks

  • Background images that are too thin may not extend all the way across an element: an image that is 10 pixels wide will extend ten times farther than an image that is 1 pixel wide.
  • You will need to place a copy of all images that have been linked relative to your stylesheet in analogous locations relative to the web page.
  • A div with background color set will get a white "gap" between border and background in NN4. Can be avoided by setting layer-background-color: color. Best used with a comment hack to hide it from better browsers.

Hacks

  1. Import Hack (hides files from Netscape 4 and older browsers)
  2. The Caio Hack (hides rules from Netscape 4, even 'inline' CSS), and the inverse Caio hack that shows rules ONLY to NN 4
  3. The Anti Nav Four Selectors (simply hide single rulesets from Nav4)

More: Css Hacks

Browser Testing

The two most common NN4 version families worth testing are 4.08 and 4.7x/4.8x; we can expect Netscape to provide NN4.8x security updates for the foreseeable future, as they support their existing customer base. People who use intermediate versions of NN4 and need to stay with an NN4 browser should be urged to upgrade to NN4.8x.

Rationale

Ask not what the world thinks of your browser: ask instead what your target audience thinks of your browser.

Useful Links

Colophon

"It is a Proud and Lonely Thing to be a Netscape Four Apologist" -- Earl Cooley

How Netscape's CSS came to be

First browser to implement CSS

Actually, the first browser to implement "appreciable support for CSS" was not Netscape, but MSIE3. Though it was later often criticized as being "incorrect", this implementation came actually before the (first) CSS standard was finalized - it was probably as "correct" as they could get it given the state of the draft. In spite of that (and some real bugs), it was already quite usable, and many web designers started using CSS as a result since it gave them something feasible to work with for the first time.

This is confirmed in the article quoted above W3C (Lie, Bos) side of the story:
"The first commercial browser to support CSS was Microsoft's Internet Explorer 3 which was released in August 1996".

Personal tools