Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquery Superfish problem in IE7

only in IE7 the submenu appear under my page's content. I use bgframe plugin.

Here my code: $("ul.sf-menu").superfish({ speed: 'fast', autoArrows: false // disable generation of arrow mark-up }).find('ul').bgIframe({opacity:false});

Do you have any ideas?

Thank you very much. Bye Z

like image 378
Zanfe Avatar asked Feb 26 '26 21:02

Zanfe


2 Answers

You may find this little chunk of code helpful, it does deep voodoo with the Z-Order. I did not create it, but it has saved me countless hours.

One way to fix many of the issues with IE7 is to dynamically reverse the default z-index stacking order of the elements on your page. This will ensure the elements higher in your HTML source will also have a higher z-index order on your page, solving most of the IE stacking issues. If you’re using jQuery (the best Javascript library there is), here’s the quick fix...

$(function() {
    var zIndexNumber = 1000;
    $('div').each(function() {
        $(this).css('zIndex', zIndexNumber);
        zIndexNumber -= 10;
    });
});

You can find it all here...

like image 60
Samurai Ken Avatar answered Feb 28 '26 11:02

Samurai Ken


It is indeed a CSS problem, and a very irritating one to fix.

Most likely you've got a position:relative or position:absolute rule on one of your container elements, or are using another JS plugin that messes with the position (such as a jquery.corner). Look around for something like that.

like image 24
Aaronaught Avatar answered Feb 28 '26 10:02

Aaronaught