Fixing the IE z-index bug.

We all know that IE is full of bugs and just plain sucks as a browser... if you didn't know that you can drop your geek badge off on the way out. So today I ran across the Z-Index bug in IE7.

Sometimes you've seen this behavior before:
Screen shot 2010-05-13 at 12.15.21 PM.png

The fix is to give the parent of the element with a z-index a slightly higher z-index

<div style="z-index: 1000">
  <div style="z-index:999">
    Content Here
  </div>
</div>

Resources:
http://brenelz.com/blog/squish-the-internet-explorer-z-index-bug/

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <drupal5>, <drupal6>, <javascript>, <php>, <sql>. Beside the tag style "<foo>" it is also possible to use "[foo]".

More information about formatting options