Archived topic
Z-index for site logo over nav menus at top
3 replies · Started by Paul on January 22, 2018
I've set a site up with secondary navigation at top, primary navigation right below that, and then a full-size page header below the navigation menus. The site header has been removed and the Site logo is set to float left as a Navigation Logo outside of the container. I did this using the method described at: https://docs.generatepress.com/article/navigation-logo/
I then had to adjust both primary and secondary nav z-indexes so that the secondary nav's drop-down sub-navigation didn't get obscured by the primary nav bar below it, but that caused the top part of the site logo to be partially hidden behind the seconday nav.
I can't seem to set a z-index on it so that it will display over the top of secondary navigation above it. I've tried z-indexing everything I can find along with adding 'position: relative', but nothing seems to bring the logo forward.
Any suggestions?
Tough one!
Give this a shot:
#site-navigation {
z-index: auto;
}
.site-logo.sticky-logo.navigation-logo {
z-index: 10;
}
Sweet! That totally did it. Never thought of z-index on the ID!
Awesome, glad I could help! :)