klenwell information services : CssHacks

CSS Selector Hacks

Methods of selecting targeting specific browsers (i.e. Internet Explorer)

IE Conditional

source: http://www.webdevout.net/css-hacks#conditional_comments-css_hack
<!--[if lte IE 6]> <link href="ie_only.css" rel="stylesheet" type="text/css"> <![endif]-->

<!--[if IE 7]><style>p{border:1px solid red}<style><![endif]-->
<!--[if lte IE 6]><style>p{border:1px solid blue}<style><![endif]-->

IE Selectors

source: http://www.webdevout.net/css-hacks#in_css-selectors
/* IE 6 and below */
* html {}

/* IE 7 and modern browsers only */
html>body {}

IE Targets

source: http://snook.ca/archives/html_and_css/targetting_ie7/
  border:1px solid green; /* works in all */
  *border:1px solid red; /* targets IE6 and 7 */
  _border:1px solid blue; /* targets IE6 */

Comments [Hide comments/form]
There are no comments.