Internet Explorer Hacks for IE6, IE7 and IE8

Posted on
By Addam Driver

Internet Explorer has problems! IE6, IE7, IE8 and IE9 render stuff differently and here are some hacks to help you get around all of the crap Microsoft makes us go through. BOOOOO!

div{
height:100px;   /* All Browsers */
height: 100\9px;   /* Internet Explorer 6, 7 & 8 */
*height: 100px;   /* Internet Explorer 6 and 7 */
_height: 100px;   /* Internet Explorer 6 */

}

What is listed above are inline hacks. I do recommend avoiding hacks but sometimes we gotta do what we gotta do. Alternatively there’s the comment IF/THEN statement you can use to separate out IE code in general (not just styles). Here are some examples:

<!–[if lte IE 8]>
Some Code Here for everything less than IE7 or whatever version you put
<![endif]–>

<!–[if IE 8]>
Some Code Here for IE8 or whatever IE version you list
<![endif]–>

<!–[if gte 8]>
Some Code Here for everything greater than IE8 or whatever IE version you list
<![endif]–>

Tags: , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CSS Methods

HTML Goodies

JavaScript

mustache

node.js

The HTML Writers Guild IWA