PDA

View Full Version : Javascript superfish menu and dd script incompatible?



webmiss
08-09-2011, 04:50 PM
Hi,

Not sure if this is the right place to post this, but I am using a superfish menu on a website and a featured content slider from DD. What is happening is that the drop down menu sometimes shows up behind the content slider rather than in front of it. This can happen in IE8 or others including Firefox. Is there anything I can do to stop this from happening? The boss wants it fixed no matter what browser is being used.

I don't know if this is a conflict or whether it is in the menu code or the featured content slider code. Would appreciate any helpful insights from those who can write code.

Corinne

XManBG
08-10-2011, 09:49 PM
Hi,

does the "z-index:xxxx" style property not working in your case??

Cheers

webmiss
08-11-2011, 02:16 AM
Should I look for the z-index in the css for the superfish menu or both it and the featured content slider?

I'll take a look to see what I can find.

Thanks for a direction to go in.

webmiss

webmiss
08-11-2011, 02:23 AM
Okay looked at css in both scripts. The content slider does not seem to have a z-index property, but the superfish does. Could that be the problem?

jscheuer1
08-11-2011, 04:06 AM
Actually the content slider has a scripted z-index. It escalates steadily from 0, incrementing by 1 every time the image or content changes. So, if your menu has a relatively low z-index - say, like 10 or even 100, the slider will eventually cover it. There's no way to completely guarantee that the slider won't overtake the menu, but if you set the menu's z-index to 10000 or even 100000, it's very unlikely to happen.

Another option would be to rearrange the layout of the page so that the slider is somewhere that the menu cannot be covered by it.

webmiss
08-11-2011, 06:46 PM
Thanks for the suggestion. I'll try setting the z-index on the menu to 1000 and see how that works, right now it is at 100.

jscheuer1
08-11-2011, 08:06 PM
Go higher.