/ Published in: CSS
URL: http://css-tricks.com/how-to-create-an-ie-only-stylesheet/
Got tired of searching for this stuff so I posted it here.
Expand |
Embed | Plain Text
/* BROWSER SPECIFIC ---------------------------------------------------- */ IE ONLY <!--[if IE]> <link rel="stylesheet" type="text/css" href="ie-only.css" /> <![endif]--> EVERYTHING BUT IE <!--[if !IE]> <link rel="stylesheet" type="text/css" href="not-ie.css" /> <![endif]--> 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 <!--[if lt IE 7]> <link rel="stylesheet" type="text/css" href="IE-6-OR-LOWER-SPECIFIC.css" /> <![endif]--> VERSION OF IE VERSION HIGHER THAN 6 <!--[if gt IE 6]> <link rel="stylesheet" type="text/css" href="IE-HIGHER-THAN-6-SPECIFIC.css" /> <![endif]--> /* Hacks --------------------------------------------------------------------------- */ IE-7 ONLY: * html #div { height: 300px; } NON IE-7 ONLY: #div { _height: 300px; } HIDE FROM IE 6 AND LOWER: #div { height/**/: 300px; } HIDE FROM IE 6 AND LOWER: (another way) html > body #div { height: 300px; }
You need to login to post a comment.
