submenu doestnt work
-
Hi!
Well, basically the plugin works well, but as it comes to the sub-menu,
a) the rest of the navigation doesn’t move down, so when I open the sub-menu it “overlays” the parent menu
b) the sub-menu items stay formatted in the way they are in the “regular” navigation. It seems that this is due to my overriding css, but otherwise the sub-menu isn’t formatted correctly in ghe regular nav.
c) i’m not able to close the nav once unfolded anymore
here’s the code:
header.php:
<header> <div id="logo"><a href="#"></a></div> <div class="container-responsive"> <nav id="mainnav"> <?php wp_nav_menu( array( 'theme_location' => 'Mainnav' ) ); ?> </nav>
style.css:
#mainnav { font-size: 1em; color: #ffffff; margin-left: auto; margin-right: auto; padding-top: .5em; height: 10em; width: 100%; position: relative; } #mainnav .menu{ width: 536px; margin-left: auto; margin-right: auto; height: 55px; } #mainnav .menu li { list-style-type: none; float: left; width: 5em; height: 1.7em; background-color: #2e5363; border-radius: 5px; margin-right: .7em; text-align: center; padding-top: 3px; display: inline; } #mainnav .menu li:last-child { margin-right: 0; } #mainnav .menu li a { text-decoration: none; color: #ffffff; width: 100%; height: 100%; display: inline-block; } #mainnav .menu li a:hover { color: #000000; } .sub-menu { position: absolute; left: -999em; opacity: 0; transition: opacity 1.5s; /* explorer 10 */ -webkit-transition: opacity 1.5s; /* chrome & safari */ -moz-transition: opacity 1.5s; /* firefox */ -o-transition: opacity 1.5s; /* opera */ } li:hover .sub-menu { left: auto; opacity: 1; margin-left: -3em; } .sub-menu li { display: inline !important; background-color: transparent !important; margin-top: 10px; padding-top: 0px !important; color: #2e5363; opacity: 1; } .sub-menu li a { color: #2e5363 !important; } .sub-menu li a:hover { text-shadow: 0px 6px 11px; }
thanks,
Johannes
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘submenu doestnt work’ is closed to new replies.