[thelist] Dynamic StyleSheets?

martin burns martin at members.evolt.org
Mon Jul 24 03:53:17 CDT 2000


> >Is there a way to dynamically assign a style sheet according to the
> browser
> >and client type? I seem to remember seeing some js snippets somewhere
> that
> >could do this. I just don't remember where.
> 
> Not sure if this is exactly what you are looking for, but here is a
> solution
> I have used to feed one style sheet to both NS and IE, one with NS
> specific
> styles to NS and another with IE styles to IE. Just include it all in
> the
> head of your document. The "disabled" attribute is only understood by
> IE, so
> NS ignores the attribute while IE ignores the style sheet.
> "document.all"
> evaluates to false in NS, true in IE.

Just remember that this may no longer apply for NS6 - as always, measure twice, cut once, test five times (at least).

Cheers
Martin




More information about the thelist mailing list