Changing stylesheets in FF & IE6
Hi,
I'm working on a site and am trying to get the stylesheets to automatically detect the browser using javascript and load the correct one. I've done before and its worked but this time I'm having no luck. Despite changing the code around both browsers continue to use the one stylesheet which is causing display problems.
Here's the code:
<link rel="stylesheet" type="text/css" href="style.css" name="ie">
<link rel="stylesheet" type="text/css" href="style_ff.css" name="ff">
<script language="javascript">
var name = navigator.appName;
if (name == "Netscape")
document.styleSheets.title = "ff";
else (name == "Microsoft Internet Explorer")
document.styleSheets.title = "ie";
</script>
Any hints/tps/alternative methods would be appreciated.
Thank you,
Steve
"I will prepare and one day my chance will come."
__________________
\"I will prepare and one day my chance will come.\"
|