Forum Moderators: open

Message Too Old, No Replies

javascript dropdown and layers

Always appears behind the relatively positioned layer.

         

driven_snow

11:32 am on Jan 16, 2004 (gmt 0)

10+ Year Member



All right, so I have this layout and I'm really, really happy with it.

But, the dropdown menu always appears behind the relatively positioned layer below it.

Is there any way around this problem?

( I wasn't sure if this belonged in the css or javascript forum, sry if I picked the wrong one. )

BlobFisk

1:55 pm on Jan 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you set a very high z-index on the drop down layer?

driven_snow

2:10 pm on Jan 16, 2004 (gmt 0)

10+ Year Member



Yes. The layer holding the menu is set at 3, the layer it's dissapearing beneah is set at 1.

:?

BlobFisk

2:16 pm on Jan 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try making it 30 and see what happens...

Also, is the drop down layer nested within the layer below it?

driven_snow

3:05 pm on Jan 16, 2004 (gmt 0)

10+ Year Member



I set it at 30, no change.

No, it's not nested, it's arranged like this :

<body>
<div> navigation </div>
<div> body of content </div>
</body>

stever

3:40 pm on Jan 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What does the div it is hiding behind contain?

BlobFisk

3:53 pm on Jan 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Good question - if it's Flash/Applet/plugin there may be an issue...

driven_snow

4:39 pm on Jan 16, 2004 (gmt 0)

10+ Year Member



Just text. ( with a background color )

:?

driven_snow

5:42 pm on Jan 17, 2004 (gmt 0)

10+ Year Member



Just in case somebody else ends up asking the same question, I'm going to post my solution.

:)

Inside the javascript itself, replace the property : "visibility:hidden;"

with: "visibility:hidden;z-index:6;" or whatever z-index thou needst. I never knew I could use that with javascript. :D

Thanks to Sal for explaining this to me.