Step 1 in IE6 Compatibility Hacking

Posted in: Development

When you’re hacking IE6 compatibility into a site, always remember to try the quick fix first:

.your-class-name {
position: relative;
zoom: 1;
}

When it works don’t ask why, just move on to the next issue.

Popularity: 5% [?]

Posted April 11th, 2007 @ 2:58 PM

9 Replies

  1. jenz adds this Comment:

    Whoa - I have never seen this hack. In what situation would you use this? (Perhaps an example?)

    April 11th, 2007 at 5:06 pm

  2. Alex adds this Comment:

    It fixes all sorts of things. I used it to fix a traveling instance of the peekaboo bug today.

    April 11th, 2007 at 5:08 pm

  3. eldub adds this Comment:

    This fixes just about all the bugs caused by not having the hasLayout property set. (Tons of info here: http://www.satzansat[...]glayout.html )
    It replaces the height:1% hack and doesn’t set a property that actually affects anything since it’s basically magnifying the element to 100%.

    It’s definitely a great place to start when IE is getting goofy

    April 11th, 2007 at 5:36 pm

  4. jenz adds this Comment:

    Thanks! I will definitely keep this tip handy.

    April 11th, 2007 at 6:13 pm

  5. yuei adds this Comment:

    Vamos a ver si funciona

    April 11th, 2007 at 8:47 pm

  6. Michael Sica adds this Comment:

    Where were you yesterday? :)

    http://www.michaelsi[...]control.html

    I used a slightly different, more global/brute force fix.

    April 11th, 2007 at 9:00 pm

  7. Anonymous adds this Comment:

    Thanks for the tip. I always have problems with IE compatibility.

    April 17th, 2007 at 6:06 am

  8. Logan adds this Comment:

    Wow. I was just using conditional comments to link a different style sheet when internet explorer was found. Then I would mess around applying different properties until it looked somewhat similar to what it ALWAYS looks like in Firefox. This hack has really helped me get rid of some annoying little discrepancies between my Firefox and IE renderings.

    August 27th, 2007 at 3:43 pm

  9. Nick adds this Comment:

    You just saved me a LOT of headache.

    May 19th, 2008 at 8:05 am

Add a Comment

Please note: Use of a non-personal web site or blog in the field below and/or comments that are off-topic, personal attacks, or support requests will likely be removed at my discretion.

Note: This post is over a year and a half old. You may want to check later in this blog to see if there is new information relevant to your comment.

GrandCentral » « Photos from the Road

About This Site

This is the personal web site of Alex King, a web developer in Denver, Colorado USA. More...


Crowd Favorite

Crowd Favorite is my software and web development business.

We build web applications, design and develop custom WordPress themes and plugins, and build custom sites using WordPress as a CMS.


I also have a tumblog that aggregates my online content from other services (Twitter, Flickr, del.icio.us. etc.).

America

Ads