Show different stylesheets for different versions of IE


/ Published in: HTML
Save to your folder(s)

Add to the of your page after the main stylesheet to serve different stylesheets for different versions of Internet Explorer


Copy this code and paste it in your HTML
  1. //for any version of IE
  2.  
  3. <!--[if IE ]>
  4. <link rel="stylesheet" href="file_path/ie.css" type="text/css" />
  5. <![endif]-->
  6.  
  7. //For IE 6 or earlier
  8.  
  9. <!--[if lte IE 6]>
  10. <link rel="stylesheet" href="file_path/ie6.css" type="text/css" />
  11. <![endif]-->
  12.  
  13.  
  14. <!--[if IE 7 ]>
  15. <link rel="stylesheet" href="file_path/ie7.css" type="text/css" />
  16. <![endif]-->

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.