[thelist] Dynamically Adding Styles in all browsers
Saila, Craig
thelist at lists.evolt.org
Mon Dec 9 09:52:01 2002
> -----Original Message-----
> From: Donald Noble [mailto:donald at drnoble.co.uk> Sent: December 8, 2002 2:43 PM
> document.styleSheets[0].addRule("div#links div","display:none");
>
> works fine in IE6, but fails in Mozilla (1.2.1) doesn't
> appear to work in Opera 6 either.
>
> how can this be done so that it is more cross browser compatible.
Peter-Paul Koch has a terrific explanation and script sample at his site
to do this in a cross-broser way:
"Change style sheet"
<http://www.xs4all.nl/~ppk/js/changess.html>
--
Cheers,
Craig Saila
------------------------------------------
craig at saila.comhttp://www.saila.com/
------------------------------------------