z-index should consider adverts

Brent W

Well-known member
Consider that the most successful Xenforo forums are very likely to have to carry banner ads to cover the server costs.
The default z-index settings mean that menus are behind ads in some cases.
Could the z-index settings of everything be changed to take advertising in to account?

The IAB guidelines for z-index use here
Just ran into this issue as well. Have you found a solution @Stuart Wright

Mike Creuzer

Well-known member
I could be wrong, but I still feel this is the correct answer: Since there is no standard, there is nothing XenForo can do to make sure advertisements show up at the correct z-index.

There needs to be a z-index standard, I've always said. Not just for xenforo but something through W3C.

Body tag: -1000
Generic elements: 0

Videos/Media: 1000
Advertisements: 2000
Dropdowns: 3000
Fixed position elements: 4000
Overlay Masks: 5000
Overlays/Modals: 6000

Stuart Wright

Well-known member
I would rather that there was a standard defined by W3C, but until then there *is* a standard as defined by the Interactive Advertising Bureau (IAB) and they are specific about the z-index values: http://www.iab.net/guidelines/508676/508767/displayguidelines
If advertisers don't comply with this, their ads are removed from AVForums.
Xenforo should consider these guidelines when setting the various z-indexes.

Having upped the z-index of the drop down menus to something huge, the only problem I have at the moment is that the drop-down menus are in front of overlays. So if I, for example, drop down the user menu and click preferences, the menu stays visible over the top of the preferences overlay.
Not a great situation and when I've tried to change the overlay settings, I tend to screw up things elsewhere.


Well-known member
I have an idea that I just tested locally and it worked, it may work on your site pending (you have a lot of stuff customized) the situation.
I assume that this is what you are trying to achieve...

If you convo me I have a few minutes now in which I can try it out.