Html/css notes
Use different css files based on different browsers <! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN "" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <Html xmlns =" http://www.w3.org/1999/xhtml "> <Head> <meta http-equiv =" Content-Type "content =" text/html; charset = UTF-8 "/> <link rel =" stylesheet "type =" text/css "href =" css/IE6.css "/> <title> untitled document </title> <script type = "text/javascript" language = "javascript"> function setCss () {// select CSS if (! Window. XMLHttpRequest) {setActiveStyleSheet ("IE6.css"); // IE6} else if (window. activeXObject) {setActiveStyleSheet ("IE7.css"); // IE7, and IE7 ++} else {setActiveStyleSheet ("other.css"); // Mozilla FireFox, Safari, etc .}} function setActiveStyleSheet (filename) {var path = document. getElementsByTagName ("link") [0]. href; document. getElementsByTagName ("link") [0]. href = "css/" + filename; alert ("css/" + filename );} Window. onload = setCss; </script>