Easy Way to get Linked Sheets for IE and Netscape
<style type="text/css"> @import url("netscape.css"); </style>
Anything on the imported style sheet will be ignored by Netscape 4 WebTv and older browsers
<head>
<link disabled rel=stylesheet href="myNetscape.css" type="text/css">
<script language="JScript"><!--
if(document.all)document.createStyleSheet("myIE.css")// -->
</script>
</head>
That's all you need! - IE4+, but not Netscape, will completely ignore the <link> tag above because it contains the "disabled" attribute, which only IE recognizes.
Netscape won't read anything within the <Script> tag with "JScript" stated as the script language. But IE will. The (document.all)? condition is within the JScript only to prevent IE3 from loading a stylesheet not intended for it.
Alternate for Loading Netscape Specific by Al Sparber of ProjectSeven.com
<link rel="stylesheet" type="text/css" href="mainstyles.css"
media="all">
<script type="text/javascript">
<!--
if(document.layers){document.write('<link rel="stylesheet"
type="text/css" href="n4styles.css">');}
// -->
</script>
Media="all" hides the main style sheet from NN4. The little script
dynamically writes a link to a NN4 style sheet and the mini sniffer in
the script makes sure that only NN4 can read and execute the script.
Alternatively, if you wanted to hide the main styles from all old
browsers, you can modify the sniffer from checking for the presence of
document.layers to the absence of document.getElementById.
Clean, neat, and tidy... and in the very unlikely event that a Netscape
4 user has JavaScript disabled, it won't matter because disabling script
in NN4 also disables CSS.