When you want to combine conditional statements, logical operators come in handy. For instance, you can use something like [if (gt IE 5)&(lt IE 7)]
or [if (IE 6)|(IE 7)]
. More details on this can be found here.
It may seem confusing to use conditional statements to comment out content. However, it’s a common practice among developers. You can follow the notation I’m familiar with, and there are additional examples on quirksmode available here:
<!--[if IE]>
According to the conditional comment, this is IE<br />
<![endif]-->
<!--[if !IE]> -->
According to the conditional comment, this is not IE<br />
<!-- <![endif]-->
The syntax mentioned has been endorsed in MS specifications, offering features like custom version vector detection. It's worth noting that IE10 might be detected as a non-IE browser, so treat it accordingly (hopefully without encountering any significant quirks that would necessitate using conditional statements in the first place).