html - CSS Bootstrap MegaMenu -
i'm trying make megamenu dropdown, bugs.
problems:
-the li tags inside sub-menu not appearing.
-mouse hover on sub-menu , main menu border disappear.
images
html:
<div class="collapse navbar-collapse" id="mainmenu"> <!-- main navigation --> <ul class="nav navbar-nav pull-right"> <li class="primary <?php if($page == 'main'){ echo 'active'; } ?>"> <a href="./?page=main" class="firstlevel last" >home</a> </li> <li class="primary <?php if($page == 'about'){ echo 'active'; } ?>"> <a href="./?page=about" class="firstlevel last" >about us</a> </li> <li class="primary"> <a href="#" class="drop">features</a><!-- begin 4 columns item --> <div class="dropdown_4columns align_right"><!-- begin 4 columns container --> <div class="col-md-4"> <h3>technical</h3> <ul> <li><a href="#">themeforest</a></li> <li><a href="#">graphicriver</a></li> <li><a href="#">activeden</a></li> <li><a href="#">videohive</a></li> <li><a href="#">3docean</a></li> </ul> </div> <div class="col-md-4"> <h3>design</h3> <ul> <li><a href="#">nettuts</a></li> <li><a href="#">vectortuts</a></li> <li><a href="#">psdtuts</a></li> <li><a href="#">phototuts</a></li> <li><a href="#">activetuts</a></li> </ul> </div> <div class="col-md-4"> <h3>software</h3> <ul> <li><a href="#">freelanceswitch</a></li> <li><a href="#">creattica</a></li> <li><a href="#">workawesome</a></li> <li><a href="#">mac apps</a></li> <li><a href="#">web apps</a></li> </ul> </div> </div><!-- end 4 columns container --> </li> <li class="primary <?php if($page == 'portfolio'){ echo 'active'; } ?>"><a href="./?page=portfolio" class="firstlevel last">portfolio</a></li> <li class="primary <?php if($page == ''){ echo 'active'; } ?>"><a href="" class="firstlevel last">downloads</a></li> </ul> <!-- end main navigation --> </div>
css
#mainmenu .navbar-nav li{ border-bottom:1px solid #555; } #mainmenu .navbar-nav li:last-child, #mainmenu .navbar-nav li:last-child a{ border-bottom:none !important; } #mainmenu li:hover { background:none; border:none; padding:0; margin:0; } #mainmenu li { display:block; outline:0; text-decoration:none; } #mainmenu li:hover { color:#161616; text-shadow: 1px 1px 1px #ffffff; } /* drop down */ .dropdown_4columns{ float:left; position:absolute; display:none; /* hides drop down */ text-align:left; border-top:none; background-color:#eee; } .dropdown_4columns {width: 560px;} #mainmenu li:hover .dropdown_4columns{ display:block; top:auto; } #mainmenu li:hover .align_right { left:auto; right:-1px; top:auto; } /* drop down content stylings */ #mainmenu p, #mainmenu h2, #mainmenu h3, #mainmenu ul li { line-height:21px; font-size:12px; text-align:left; } #mainmenu h2 { font-size:21px; font-weight:400; letter-spacing:-1px; margin:7px 0 14px 0; padding-bottom:14px; border-bottom:1px solid #666666; } #mainmenu h3 { font-size:14px; margin:7px 0 14px 0; padding-bottom:7px; border-bottom:1px solid #888888; } #mainmenu p { line-height:18px; margin:0 0 10px 0; } #mainmenu li:hover div { font-size:12px; color:#015b86; } #mainmenu li:hover div a:hover { color:#029feb; } #mainmenu li ul { list-style:none; padding:0; margin:0 0 0px 0; } #mainmenu li ul li { position:relative; padding:0; margin:0; float:none; text-align:left; display:block; } #mainmenu li ul li:hover { background:none; padding:0; margin:0; } .navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav>li>a:hover, .navbar-default .navbar-nav>li>a:focus, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus{ background:none; border-bottom:3px solid #984793; color:#984793; }
the problem css:
#mainmenu .navbar-nav li:last-child, #mainmenu .navbar-nav li:last-child a{ border-bottom:none !important; /* removes bottom border last-child */ }
if remove works expected
Comments
Post a Comment