Welcome to WebmasterWorld Guest from 3.228.24.192

Forum Moderators: open

Message Too Old, No Replies

DIV containing ads obscures my drop-down nav menu

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

Junior Member

10+ Year Member

joined:Mar 18, 2003
posts:68
votes: 0


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?

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

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


z-index only applies to specifically positioned elements - are both these elements positioned?
9:43 pm on Sept 3, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 18, 2003
posts:68
votes: 0


the nav menu is absolutely positioned; the DIV with the ads is not.
11:27 pm on Sept 3, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:May 30, 2003
posts:728
votes: 0


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

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

Junior Member

10+ Year Member

joined:Mar 18, 2003
posts:68
votes: 0


thx for that, but ufortunately it didn't work :(
10:50 pm on Sept 4, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Dec 4, 2004
posts:801
votes: 0


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.