/ Published in: HTML
how to link ie only stylesheets and stylesheets by generation of ie
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Here is the basic technique for an IE-Only stylesheet: <!--[if IE]> <link rel="stylesheet" type="text/css" href="ie-only.css" /> <![endif]--> The opposite technique, targeting only NON-IE browsers: <!--[if !IE]> <link rel="stylesheet" type="text/css" href="not-ie.css" /> <![endif]--> If you need to get down and dirty with specific versions of IE, here are a few examples. IE 7 ONLY: <!--[if IE 7]> <link href="IE-7-SPECIFIC.css" rel="stylesheet" type="text/css"> <![endif]--> IE 6 ONLY: <!--[if IE 6]> <link rel="stylesheet" type="text/css" href="IE-6-SPECIFIC.css" /> <![endif]--> IE 5 ONLY: <!--[if IE 5]> <link rel="stylesheet" type="text/css" href="IE-5-SPECIFIC.css" /> <![endif]--> IE 5.5 ONLY: <!--[if IE 5.5000]> <link rel="stylesheet" type="text/css" href="IE-55-SPECIFIC.css" /> <![endif]--> VERSION OF IE VERSION 6 OR LOWER: (I find this one pretty handy) <!--[if lt IE 7]> <link rel="stylesheet" type="text/css" href="IE-6-OR-LOWER-SPECIFIC.css" /> <![endif]-->
URL: http://css-tricks.com/how-to-create-an-ie-only-stylesheet/