Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

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



Application Security Testing: An Integral Part of DevOps

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