views:

98

answers:

3
<!--[if IE 6]>
I am using IE6
<![endif]-->

That works.

How do I do "or" IE7?

+1  A: 

you can do

<!--[if IE &lte; 7]>
I am using IE less than or equal to version 7
<![endif]-->

Have a look at http://www.quirksmode.org/css/condcom.html#link3 for detailed options..

Gaby
A: 

same exact format. just change the ie version. Refer to here. http://msdn.microsoft.com/en-us/library/ms537512(VS.85).aspx

samer
+2  A: 

If you, for whatever reason, what to only test for IE6 or IE7, and maybe have some other conditions for IE5 elsewhere, there is also support for other operators:

  <!--[if (IE 6)|(IE 7)]>
    This is IE 6 or IE 7!
  <![endif]-->

Check out the wikipedia article which has better documentation than Quirksmode on this.

Anthony
+1, nice link Anthony
Gaby