views:

60

answers:

2

Hi,

I'm testing a website using Jquery. I have a plugin that when you hover over it, it slides down revealing another banner thus sliding the banner below down. I've overlayed a link in using z-index on the bottom banner, but whilst it works in other browsers I can't see it in IE7.

Any ideas why? Would moving the styles up help? Or moving the element above the banner in the html?

Thanks Judi

A: 

it sounds like the ie z-index bug. the fix is to loop through all related items and set its z-index like:

var zee_index = 1000;
$('.item').each(function(){
    $(this).css('zIndex',zee_index--);
});
Funky Dude
Thanks, I'm a bit of a newbee at css. Can you explain how this works a little more?
judi
judi
and css is =div#secondary-content a.TandCcontent {z-index:2; position:relative; left:128px; bottom:22px; color:#0B57A4; font-size:1.1em;}
judi
A: 

IE gets funky with z-indexes if you don't put a 'position:' property in there.

contagious