z-index bug in IE

/ Published in: CSS
Save to your folder(s)

IE will place any relative positioned element above an abolute positioned element with a higher z-index. The way to fix it is make the parent element of the absolute positioned element a higher z-index.

Copy this code and paste it in your HTML
  1. <div style="z-index: 3000">
  2. <div style="position:absolute;z-index:1000;">
  3. <a href="#">Page</a>
  4. ...
  5. </div>
  6. </div>
  7. <img style="position:absolute" src="myimage.png" />

URL: http://www.brenelz.com/blog/2009/02/03/squish-the-internet-explorer-z-index-bug/

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.