Resources: Code

Target IE6, IE7 and IE8 with CSS

27 September 2012

Sometimes it’s just not worth creating a completely new CSS file for one IE6 fix, you just want to create a hack within your primary stylesheet – check out the hacks below!

#element {
background: #00f; /* all browsers including Mac IE */
*background: #f00; /* IE 7 and below */
_background: #0f0; /* IE 6 and below */
_bac\kground: #f60; /* IE 6 only */
padding: 7px;
color: #fff;
}

Tags: , , , , ,

Let's work together