IE Conditional Comments


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

The following is a list of any conditional comment you'd probably ever need for targeting any version of IE.


Copy this code and paste it in your HTML
  1. <!--[if IE]>
  2. <link rel="stylesheet" href="css/ie.css" type="text/css" />
  3. <![endif]-->
  4.  
  5. <!--[if IE 5]>
  6. <link rel="stylesheet" href="css/ie5.css" type="text/css" />
  7. <![endif]-->
  8.  
  9. <!--[if IE 5.5]>
  10. <link rel="stylesheet" href="css/ie55.css" type="text/css" />
  11. <![endif]-->
  12.  
  13. <!--[if IE 6]>
  14. <link rel="stylesheet" href="css/ie6.css" type="text/css" />
  15. <![endif]-->
  16.  
  17. <!--[if IE 7]>
  18. <link rel="stylesheet" href="css/ie7.css" type="text/css" />
  19. <![endif]-->
  20.  
  21. <!--[if IE 8]>
  22. <link rel="stylesheet" href="css/ie8.css" type="text/css" />
  23. <![endif]-->
  24.  
  25. <!--[if lt IE 7]>
  26. <link rel="stylesheet" href="css/ie.css" type="text/css" />
  27. <![endif]-->
  28.  
  29. <!--[if lt IE8]>
  30. <link rel="stylesheet" href="css/ie.css" type="text/css" />
  31. <![endif]-->

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.