Internet Explorer (IE) CSS Hacks with Conditional Comments

This is self explanatory. I have only used this for CSS hacks. This may also work for HTML tags. See the examples below:

<!--[if IE]>
Conditional comment for IE
<style type="text/css">
.ie { padding:5px; }
</style>
<![endif]-->
<!--[if IE 6]>
<p>
Conditional comment for IE 6
</p>
<![endif]-->
<!--[if IE 7]>
Conditional comment for IE 7
<![endif]-->
<!--[if IE 8]>
Conditional comment for IE 8
<![endif]-->
<!--[if IE 9]>
Conditional comment for IE 9
<![endif]-->
<!--[if gte IE 8]>
Conditional comment for IE 8 or higher
<![endif]-->
<!--[if lt IE 9]>
Conditional comment for IE lower than 9
<![endif]-->
<!--[if lte IE 7]>
Conditional comment for IE lower or equal to 7
<![endif]-->
<!--[if gt IE 6]>
Conditional comment for IE greater than 6
<![endif]-->
<!--[if !IE]> -->
Conditional comment NOT for IE
<![endif]-->

Comments

Popular posts from this blog

How to resolve 'res://ieframe.dll/acr_error.htm#' error (Internet Explorer stopped working while viewing a website)

htaccess: Redirecting multiple domains to the main domain

MailChimp API V2.0 SSL error solution