IE CSS Conditional

Conditional comments are a simple Internet-Explorer-only feature that Microsoft added to IE5 Windows and later. (Mac IE doesn’t support them.) They provide an easy way to detect that the visitor is using an IE browser (and which version they’re using). You can then serve IE users different blocks of HTML as required.

<!--[if gte IE 7]>
<link rel="stylesheet" type="text/css" href="ie01.css" />
<![endif]-->

<!--[if IE 5]>
<p>This message is only displayed in IE5.</p>
<![endif]-->

<!--[if !IE 5]>
<p>This message is only displayed in browsers other than IE5.</p>
<![endif]-->

<!--[if lt IE 7]>
<p>This message is only displayed in browsers earlier than IE7.</p>
<![endif]-->

<!--[if gte IE 7]>
<link rel="stylesheet" type="text/css" href="ie01.css" />
<![endif]-->

<!--[if IE]>  
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>  
<![endif]--> 

  1. Leave a comment

Leave a comment

Design a site like this with WordPress.com
Get started