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.

Share:

1 Response to IE Conditional Comments

Leave a Reply

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