Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Web
Expertise: Intermediate
Apr 20, 2000



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Determine Which Style Sheets to Use

There are some differences in Cascading Style Sheet implementation in Internet Explorer 3 and 4. So you may want to choose which set of style sheets to load for your web page depending on the user's browser. This way, you can take advantage of some new attributes that are supported by IE 4 but not IE 3.

Use a browser version detection to determine which style sheet to load. For example,
<SCRIPT LANGUAGE="Javascript"> 
<!-- var bIsIE = navigator.appName == "Microsoft Internet Explorer" var bIsIE4 = bIsIE && navigator.appVersion.indexOf("4.0") > -1 
if (bIsIE4) 
{ sCSS = '<LINK REL="stylesheet" TYPE="text/css" HREF="IE4.css">' } 
if (bIsIE) 
{ sCSS = '<LINK REL="stylesheet" TYPE="text/css" HREF="IE3.css">' } } 
document.write(sCSS) file://--> </SCRIPT>
Be sure to place the script in the <HEAD> section of your HTML document.
Manoj K.
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date