I have an overlay I created that has the following styling:
#overlay-2 {
height: 100%;
width: 100%;
position: fixed;
left: 0;
top: 0;
background: none repeat scroll 0 0 #000000;
opacity: 0.85;
z-index: 10;
}`
I am trying to allow my header to still show above the overlay. (I am using the overlay for when drop down menus are open the site will darken (with the overlay) but the header and menu will still be normal).
This is just one of my header id's:
#header_main {
z-index: 11;
position: relative;
}
and another:
#megaMenu {
position: relative;
z-index: 500;
}
But nothing changes! I have even changed the position to fixed like the overlay, but still no change. What could be causing this? Also, I've heard mixed info on whether or not z-index is still relevant among differing position types. Ex. fixed vs relative would mean nothing. Their z-indexes don't matter to eachother. While others say the exact opposite "It doesn't matter what position type as long as it isn't static"
------------------------UPDATED:----------------------------------- Here is the html (from firebug) wordpress site.
<head>
<body id="top" class="home page page-id-1412 page-template-default logged-in stretched open_sans open_sans siteorigin-panels" itemtype="http://schema.org/WebPage" itemscope="itemscope">
<div id="wrap_all">
<header id="header" class="header_color light_bg_color mobile_drop_down" itemtype="http://schema.org/WPHeader" itemscope="itemscope" role="banner">
<div id="header_meta" class="container_wrap container_wrap_meta">
<div id="header_main" class="container_wrap container_wrap_logo">
<div id="header_main_alternate" class="container_wrap">
<div class="header_bg"></div>
</header>
<div id="main">
</div>
<div class="main_color avia-builder-el-9 el_after_av_slideshow_full masonry-not-first container_wrap fullsize">
<div id="after_masonry" class="main_color container_wrap fullsize">
<div id="av_section_3" class="avia-section main_color avia-section-default avia-no-shadow avia-builder-el-11 el_after_av_one_full container_wrap fullsize">
<div id="after_section_3" class="main_color container_wrap fullsize">
<div id="footer" class="container_wrap footer_color">
<footer id="socket" class="container_wrap socket_color" itemtype="http://schema.org/WPFooter" itemscope="itemscope" role="contentinfo">
<div id="login-box" class="login-popup">
//scripts etc..
<div id="fb-root"></div>
<div id="overlay-2" style="display: block;"></div>
</body>