Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
My menu block overlaps a banner and is supposed to sit above the banner. I'm using the following code:
#block-menu-menu-buffelspoort {
margin-top: -100px;
width: 980px;
margin-left: auto;
margin-right: auto;
}
#block-menu-menu-buffelspoort .block-title{
display: inline-block;
background-color: #c4094a;
padding: 20px;
margin-top: -10px;
color: white;
text-transform: uppercase;
}
#block-menu-menu-buffelspoort ul.nav {
display: block;
background-color: #c4094a;
padding: 20px;
margin-top: -10px;
}
When I'm logged in the everything looks good but when I'm logged out the background of the block goes behind the banner.In Blocks, the order of blocks is the banner is above the menu-block.
Please help. I've attached a screenshot of what I see when I'm logged out and logged in.
Comment | File | Size | Author |
---|---|---|---|
loggedout.png | 300.28 KB | hmartens | |
loggedin.png | 273.78 KB | hmartens |
Comments
Comment #1
hmartens CreditAttribution: hmartens commentedI was told that if a block doesn't have a position then z-index doesn't work on it. So I added the following css and everything displayed perfect: