Forum Moderators: open

Message Too Old, No Replies

Netscape 4 CSS Oddities

Compilation of most important strange behaviors and workarounds

         

waldemar

11:02 am on Jul 14, 2003 (gmt 0)

10+ Year Member



I'm having a hard time getting an overview what issues to take into account when it comes to N4 + Other Browsers rendering. There is quite a lot of posts here, but how about compiling a list of the most annoying Netscape 4 CSS bahaviors and workarounds?

N4 only renders external stylesheets

Use the regular <link> tag. (I tried inline styles with 4.74 which seem to "turn off" the external style sheet from the style="" position on.)

Sometimes it's a good idea to provide two different style sheets (one for N4, one for the rest)

In the HTML document <link> to N4-Stylesheet, and from there @import the other one, since N4 doesn't recognize the @import command.

N4 doesn't recognize form element widths like for type="text"

Use size="x" to adjust roughly to the desired width in N4 and then use width:Ypx; to satisfy the other brothers. It is also a good idea to specify the font+size for form elements.

N4 only draws table cells that have content

Having empty cells <td></td> leads to some confusion, especially when it comes to backgrounds. Inserting &nbsp; will solve some problems. If the &nbsp; is too large, use a (transparent) spacer gif instead.

Good additional ressources are:
CSS Bugs and Workarounds: [css.nu...]
Bug Guide Netscape4: [richinstyle.com...]

Any other important issues you had personal expierence with?
Take care

Hester

4:00 pm on Jul 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Man, the list is so long. I've found that:

Images linked to in stylesheets from another folder don't work.

The reason is the address always defaults to the root! Eg:


.index2 {background-image: url(../images/backlogo5.gif);}

This fails so I add a hack that avoids using a separate stylesheet for NS4:

.index2 {background-image: url(../images/backlogo5.gif);
/*/*//*/ background-image: url(images/backlogo5.gif); /* */
}

It gets the second line which is incorrect as the stylesheet is linked to like this:

<link rel="stylesheet" href="css/styles8.css" type="text/css" media="screen" />

So the first line of CSS is correct, but Netscape thinks the stylesheet starts from the root directory instead!

Pricey

4:32 pm on Jul 14, 2003 (gmt 0)

10+ Year Member



Pish pish to NS4.

Its just makes everyones life harder :P