Forum Moderators: open

Message Too Old, No Replies

DIV containing ads obscures my drop-down nav menu

         

hound_dog

12:21 pm on Sep 3, 2005 (gmt 0)

10+ Year Member



I have a DIV containing Google AdSense, and I have a nav menu which uses a drop-down system. The menu drops down behind the DIV... in other words, the menu is obscured by the ads.

Now I have the DIV with z-index: 0 and the drop-down menus at z-index: 1 and I thought that would do it, but it doesn't. This problem is only in Opera (8)

Anyone got any tips?

tedster

6:29 pm on Sep 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



z-index only applies to specifically positioned elements - are both these elements positioned?

hound_dog

9:43 pm on Sep 3, 2005 (gmt 0)

10+ Year Member



the nav menu is absolutely positioned; the DIV with the ads is not.

bedlam

11:27 pm on Sep 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



the nav menu is absolutely positioned; the DIV with the ads is not.

Wherever you're defining the styles for the non-absolutely positioned div, add "position:relative;"; this should cause the element to obey the 'z-index' declaration without changing its behaviour.

-B

hound_dog

12:03 am on Sep 4, 2005 (gmt 0)

10+ Year Member



thx for that, but ufortunately it didn't work :(

2by4

10:50 pm on Sep 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



adsense, last I checked, creates an iframe. Firefox etc doesn't support writing over an iframe, like a drop menu for example. Same goes for flash. An iframe is a separate window, and Firefox doesn't write one window's content over this second window. I can't remember if IE does, I think it does with flash, not sure about iframes.