Friday, August 26, 2011

IE7 Z-Index ignored

Using this nice little menu:
http://www.threestyles.com/tutorials/css-drop-down-navigation-tutorial

Part of the stack got slid behind a slide. Setting a z-index worked *except* IE7 ignored it.

Fix:
http://stackoverflow.com/questions/3385513/ie7-puts-absolutely-positioned-div-underneath-ignores-z-index

IE's stacking order algorithm is messed up. You have to position the parent of the element you want on top, give it a position like relative if it doesn't already have one, and a positive z-index.
That will usually resolve it. If not, keep trying the parent of that until you get it.

No comments: