IE Conditional Comments

In brief it goes like this:

<!--[if gte IE 8]>
<p>Greater then or equal to IE8</p>
<![endif]-->
<!--[if lt IE 7]>
<p>Less then IE7</p>
<![endif]-->
<!--[if IE 7]>
<p>Code strictly for Internet Explorer 7</p>
<![endif]-->
<!--[if !IE]>-->
<p>Any Internet Explorer will NOT read this. Valid HTML</p>
<!--<![endif]-->

Here’re some options:

  • lt less than operator
  • lte less than or equal to
  • gt greater than
  • gte greater than or equal to

Of cause, we may put inside style definitions for different versions.

One Response to IE Conditional Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="">