choose the appropriate style sheet -
<script language="JavaScript">
bversion=parseInt(navigator.appVersion);
if (navigator.appVersion.indexOf('5.')>-1){
bversion=5
};
if (navigator.appVersion.indexOf('6.')>-1){
bversion=6
};
if (navigator.appVersion.indexOf('7.')>-1){
bversion=7
};
browsername='other browsers';
if (navigator.appName=='Netscape'){
browsername='NS'+version;
}
if (navigator.appName=='Microsoft Internet Explorer'){
browsername='MSIE'+version;
}
if(browsername == 'NS5'){
browsername='NS6'
};
//Internet Explorer
if (browser=='MSIE7') {
document.write('<link rel="stylesheet" type="text/css" href="/mie7.css">');
}
// set css file for other ie versions
//Netscape
if (browser=='NS4') {
document.write('<link rel="stylesheet" type="text/css" href="/nn4.css">');
}
//// set css file for other netscape versions
//other browsers
if (browser=='other browsers') {
document.write('<link rel="stylesheet" type="text/css" href="/others.css">');
}
</script>
you can also use the following comment for setting style sheet for
ie browsers instead of using javascript -
<!--[if IE]><style type="text/css">@import "ine_fix.css";</style><![endif]-->
only ie browsers will understand this line and use the css file.but
other browsers will just ignore the line and use the default css file.