I have a DIV element with a background image and I am trying to float it over the NAV element that constitutes the menu bar in the 2011 theme. However The DIV always appears underneath the NAV element:
CSS
nav#access {
border-top-left-radius: 10px;
border-top-right-radius: 10px;
z-index: 9999;
}
div#logo {
height: 122px;
width: 120px;
position: absolute;
top: 20px;
left: 280px;
background: url(images/mylogo.png);
z-index: 1;
}
The DIV is added to the header.php file in the 2011 theme as the 1st element inside the body element.
Your
<div>element has a lowerz-indexthan your<nav>element and thus will always appear “underneath” it.You just need to specify
div#logo { z-index:10000; }or higher to bring it in front of the