IE-7 Z-index problem
http://www.mimi.clickedsolutions.com/
in above site when selecting option 开发者_StackOverflow中文版in dropdown box right to search box in header options are going behind the header image or logo in IE-7 I think it the Z-index problem i am facing this problem again and again and didnt get any effiecient solution yet please suggest me the solutions
I'm on a ferry typing this on my phone, so I can't test your link, but...
In all browsers, z-index is relative to the nearest stacking context. In FF, Chrome, IE8, stacking context is most often created by having positioning (relative or absolute) and a z-index. In IE7, only positioning is needed to create a stacking context.
What this means is that in IE7, z-index only applies up to the nearest parent with any position property set.
To make all browsers behave like IE7, for sanity, add "z-index: 1" to any element that also has position set to "relative" or "absolute"
Background information for this bug: IE7 Z-Index issue - Context Menu
A solution specifically for your case and the exact way you have your page at the moment:
- On
#header-bar
, addz-index: 9999
(or whatever number, I just picked that for convenience) - On
#mainpage
, addposition: relative
.
And here's a live version showing a version of the fixes in action, check it out with IE7:
http://jsbin.com/exuko6
精彩评论