Mar 07
Conditional Comments
- Syntax
<!--[if condition]> HTML <![endif]-->
<!-- Any Version of IE (typically 5, 5.5, 6, or 7) -->
<!--[if IE]> HTML <![endif]-->
<!-- Versions Less Than Version -->
<!--[if lt IE version]> HTML <![endif]-->
<!-- Versions Less Than or Equal To Version -->
<!--[if lte IE version]> HTML <![endif]-->
<!-- Only Version -->
<!--[if IE version]> HTML <![endif]-->
<!-- Versions Greater Than or Equal To Version -->
<!--[if gte IE version]> HTML <![endif]-->
<!-- Versions Greater Than Version -->
<!--[if gt IE version]> HTML <![endif]-->
Easy Selectors
- IE6 and below
*html .hackname { property: value; }
*:first-child+html .hackname { property: value; }
*html .hackname { property: value; }
*:first-child+html .hackname { property: value; }
html>body .hackname { property: value; }
html>/**/body .hackname { property: value; }
html:first-child .hackname { property: value; }
.hackname, x:-moz-any-link { property: value; }
.hackname, x:-moz-any-link, x-default { property: value; }
.hackname empty { property: value !important; }
body:first-of-type .hackname { property: value; }
Unrecommended Hacks
- !important
.hackname {
property: value !important; /* IE7 and Modern Browsers */
property: value; /* IE6 and below */
}
.hackname {
_property: value; /* IE6 and below */
}
.hackname {
*property: value; /* IE7 and below */
}
Related Posts
Leave a Reply
You must be logged in to post a comment.

