Superfish jQuery Menu IE z-index Bug
As a good and stable dropdown menu I’m using the Superfish jQuery menu plugin by Joel Birch. Superfish is an enhanced Suckerfish-style menu jQuery plugin that is quite easy to customize.
I really like this dropdown menu and in Firefox (as almost always) everything worked properly. But then I tested in IE. The source code was similar to this
<div id="header">
<div id="nav" class="sf-menu">Here the menu</div>
</div>
<div id="content">Here the content</div>Both the header and the content div have position:relative. In IE the dropdown menu was displayed under the content div so the links in the dropdown were not clickable though the z-index of the menu list was set to 100. After a bit of research I came accross the IE z-index Bug on Klog - php, linux, ajax, javascript.
On this page Kae Verens describes the bug and gives an example. But the solution was some kind of unsatisfactory for me. But one of the commenters - Michael - posted a very simple solution.
You do not have to set the z-index on the menu or its children but on the (in my example) two position:relatvie elements header and content.
So I set:
#header { z-index:2; } #content { z-index:1; }
and the problem was fixed! Thanks to Michael.
Ähnliche Artikel
Hat Dir der Artikel gefallen?
5 Kommentare zu Superfish jQuery Menu IE z-index Bug
Sag Deine Meinung!
Free WordPress Themes
Beliebte Artikel
User Kommentare
Alex sagt zu Superfish jQuery Menu IE z-index Bug:
Nice one! I read the klog post before reading this and somehow I had missed...
webdemar sagt zu Frohes Neues!:
@Kristin:
Vielen Dank ;-)...
Kristin sagt zu Frohes Neues!:
Ich wünsche dir auch ein frohes neues Jahr. Ich wünche dir viel Glück bei d...
Alec sagt zu WordPress Theme deFusion 0.9:
Really like your deFusion theme. I've tinkered with it, and thought you mig...
Ahmet Topal sagt zu Sticky Posts in WordPress 2.7:
Ich glaube, dass war Otto42, der dass mit dem Query gesagt hat :?...
5. Januar 2009
Nice one! I read the klog post before reading this and somehow I had missed Michael’s solution! I was having the exact same problem as you (including the superfish menu). You nailed it, mate!
16. Dezember 2008
WoW man even IE6 obeys. This has saved my life!
Thx so much for taking the time to post this.
20. November 2008
@james:
Exactly! It is so simple, but though you have to know. I didn’t and could have gone crazy with this
19. November 2008
woow very nice
thanx.
13. November 2008
Hi, after much research and reading about iframes and other horrible fixes, this was the answer. So simple. A valuable lesson learned. Many thanks for posting!