[thelist] Netscape and CSS

James Aylard jaylard at encompass.net
Mon Dec 4 00:38:49 CST 2000


Michael,

> ...HOWEVER, this was until I resized the window. Then all styles
> disappeared, for some reason Netscape looses the style sheet when it
> redraws. Bullocks!
>
> Anyone have a workaround (other than just using IE)?

	Here is one common fix:

<body onresize="window.location.reload();">

	Better still would be to plop this into a function that assures only
Netscape 4 will do the reload (since it is unnecessary and annoying for
users of other browsers):

function fnReload() {
   if (document.layers) {
      window.location.reload() ;
   }
}

	...and then call this function from your onresize event handler. IIRC, this
layout problem only occurs with absolutely positioned content (but I could
be wrong), and I think I recall that late versions of Communicator 4.x
automatically do a reload on a resize (but I could be wrong about that,
too -- I'm an IE intranet guy, primarily). Darn irritating problem, either
way.

hth,
James Aylard





More information about the thelist mailing list