0

Taking the pain out of IE6

As Bill posted here, IE6 will enter its 3013th day of existence on Nov. 26 2009…  that is older than dirt in the web world. If you are like me, not only have you spent many hours learning how to beat it, but having to fire up Internet Explorer (or Exploder as we refer to it at integritive) to check your project will make you cringe.

Two tools that are staples in my library help take the pain out of coding for IE6 or any of the “Exploders” for that matter.

  1. IE-7.js… found here. IE7 is a JavaScript library to make IE6 act like it knows what its doing. Not only does it take care of transparent PNGs for you (simply add “-trans” to the end of the name of your png), but it also takes care the min-height issue and many others. I swear it has almost removed my need to use IE only style sheets and at the very least reduced them to only a few lines.  One kicker on the transparent PNG fix is that it does not support repeating backgrounds, for that you’ll have to use this:

    #mydiv {
    width:1000px;
    filter:progid:DXImageTransform.Microsoft.AlphaImageLoader
    (src=’images/my_bg.png’,sizingMethod=’scale’);
    background:none;
    }

    You’ll notice an IE8 js on the link above as well. It takes care of both IE6 and IE7, so if you use it, no need to use IE7.js also.

  2. Reset.css… found here, is part of the YUI project.  It does this:

    “The foundational YUI Reset CSS file removes and neutralizes the inconsistent default styling of HTML elements, creating a level playing field across A-grade browsers and providing a sound foundation upon which you can explicitly declare your intentions.”

    It literally sets everything to ZERO.  Some may argue that this is overkill, since it even takes the strong out of the <strong> tag, but you are free to comment out any properties that you don’t want to define yourself.  The benefit of using reset.css is two fold in that it will help not only with IE, but help keep your project looking consistent across all browsers.

Hats off to the folks at http://developer.yahoo.com/ and  http://code.google.com/ who are involved in both these projects!

How do you take the pain out of IE6?  Feel free to share.  Its how we all move the Internet(s) forward!

Tags: ,