[Javascript] CSS multibrowser

German Sibay gsibay at hexacta.com
Thu May 12 08:43:41 CDT 2005


Hi, I have the following problem:
I have two different stylesheets, one for Mozilla and another for IE.
I´m using Struts and remoteScripting. 
I have the javascript code to detect the browser already but I don't discover how to change the style sheet by javascript. The idea is that depending on the browser I want to include this
<link href="../css/ie/tabs.css" rel="stylesheet" 	type="text/css"> 
For IE
Or this
<link href="../css/moz/tabs.css" rel="stylesheet" 	type="text/css">
For Moz

Can I easily change the complete stylesheet with a javascript function when the page is loaded (onLoad) ?

Thanks!





More information about the Javascript mailing list