A few things I've learned about Netscape 4 in the past 24 hours:
1) Common wisdom says Netscape 4 doesn't support the overflow CSS attribute. This is not entirely true. Declaring overflow:hidden causes NS4 to make the clip dimensions of a DIV read-only. This can be particularly baffling when you are manipulating clip values to create wipe effects, as the clip will never change in NS4 until you remove the overflow:hidden declaration.
2) If you use document.write() to generate DIV elements with CSS in the style attributes, be prepared for a world of pain. NS4 will generate two DIVs for every one you write, which messes up the contents of the document.layers collection. The evil twin DIV contains an alien mutant property called "ttyle" (no, that's not a typo) which actually contains your CSS.
3) The only way around the above problem is to document.write() your CSS within enclosing STYLE tags, separate from the DIV element. Don't concatenate the CSS and DIV strings together in a single write(); do one for each string, CSS first, then the DIV. Trust me on this. Oh, and forget about validation.
4) In fact, never trust document.write() to place anything where you expect it to be. Today I tried to write a positioned DIV containing an image and accompanying imagemap into a page. Netscape 4 insisted on placing the imagemap outside of the DIV, where it's useless because the image and the imagemap need to live in the same document object in order to work -- in this case, I really, really needed to have that imagemap inside the layer. But nooooooo.
5) I really, really, really, really, really dislike having to develop anything beyond a simple web page in this browser. My heart sinks each time I hear the words "and it has to work in Netscape 4" because what I really hear is "we're going to double, maybe even triple the time and expense needed to finish this project, and in the end it'll never work or look quite as good as it will in browsers born after 1997, but we'll do it anyway because we *heart* wasting resources!"
Sometimes I think I'd rather do a web application entirely in Flash rather than support NS4 and its buggy CSS and primtive object model.
src =
http://www.scottandrew.com/