the MMM blog

Include IE Only Stylesheets in HTML Head

Include IE Only Stylesheets in HTML Head


IE version above IE 10 do not support conditional comments at all.

 

ALL VERSIONS of IE

<head>
...
<!--[if IE]> <link rel="stylesheet" type="text/css" href="all-ie.css" /> <![endif]-->
...
</head>

 

NOT IE

<head>
...
<!--[if !IE]> <link rel="stylesheet" type="text/css" href="not-ie.css" /> <![endif]-->
...
</head>

 

IE7 ONLY

<head>
...
<!--[if IE 7]> <link rel="stylesheet" type="text/css" href="ie7.css" /> <![endif]-->
...
</head>

 

IE6 ONLY

<head>
...
<!--[if IE 6]> <link rel="stylesheet" type="text/css" href="ie6.css" /> <![endif]-->
...
</head>

 

IE5 ONLY

<head>
...
<!--[if IE 5]> <link rel="stylesheet" type="text/css" href="ie5.css" /> <![endif]-->
...
</head>

 

IE6 AND LOWER

<head>
...
<!--[if lte IE 6]> <link rel="stylesheet" type="text/css" href="ie6-lower.css" /> <![endif]-->
...
</head>

 

IE7 AND LOWER

<head>
...
<!--[if lte IE 7]> <link rel="stylesheet" type="text/css" href="ie7-lower.css" /> <![endif]-->
...
</head>

 

IE8 AND LOWER

<head>
...
<!--[if lte IE 8]> <link rel="stylesheet" type="text/css" href="ie8-lower.css" /> <![endif]-->
...
</head>

 

IE6 AND HIGER

<head>
...
<!--[if gte IE 6]> <link rel="stylesheet" type="text/css" href="ie6-higher.css" /> <![endif]-->
...
</head>

 

IE7 AND HIGER

<head>
...
<!--[if gte IE 7]> <link rel="stylesheet" type="text/css" href="ie7-higher.css" /> <![endif]-->
...
</head>

 

IE8 AND HIGER

<head>
...
<!--[if gte IE 8]> <link rel="stylesheet" type="text/css" href="ie8-higher.css" /> <![endif]-->
...
</head>

 

"One today is worth two tomorrows"

Contact me!

Have questions? Feel free to use the form or send me an email with any questions.

I will be responsive to your requests and your questions.