css - HTML: Bootstrap Navbar has full spanning underline that I can't identify? -
i creating practice navbar using bootstrap cdn. cake except default there underline either wish remove or customize, didn't put there not sure how identify in css selectors.
using chrome dev tools found item display: table
when disable bar jumps above tabs. table relate behind tabs, not actual line itself.
my html:
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>mockup navbar</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"> <style type="text/css"> body { background-color: gray; } #home { padding: 11px; background-color: #64a3dd; color: white; border-radius: 3px; } .divider { width: 80%; } { color: #ffffff; } .dropdown { margin-right: 1px; margin-left: 1px; border-radius: 3px; background-color: #64a3dd; } </style> </head> <body> <div class="menu-mockup" style="center"> <ul class="nav nav-tabs"> <li class="active"> <div id="home"> <a href="#"><i class="fa fa-home"></i></a> </div> </li> <li class="dropdown"> <a href="#" data-toggle="dropdown" class="dropdown-toggle">community</a> <ul class="dropdown-menu"> <li><a href="#">recent activity</a></li> <li class="divider"></li> <li><a href="#">member forum</a></li> <li class="divider"></li> <li><a href="#">member list</a></li> <li class="divider"></li> <li><a href="#">member groups</a></li> </ul> </li> <li class="dropdown"> <a href="#" data-toggle="dropdown" class="dropdown-toggle">pet help</a> <ul class="dropdown-menu"> <li><a href="#">pets dummies</a></li> <li class="divider"></li> <li><a href="#">expected costs</a></li> <li class="divider"></li> <li><a href="#">breeds</a></li> <li class="divider"></li> <li><a href="#">pet quiz</a></li> </ul> </li> <li class="dropdown"> <a href="#" data-toggle="dropdown" class="dropdown-toggle">pets sale</a> <ul class="dropdown-menu"> <li><a href="#">buying guide</a></li> <li class="divider"></li> <li><a href="#">search location</a></li> <li class="divider"></li> <li><a href="#">search species</a></li> <li class="divider"></li> <li><a href="#">pet accessories</a></li> </ul> </li> <li class="dropdown"> <a href="#" data-toggle="dropdown" class="dropdown-toggle">pet services</a> <ul class="dropdown-menu"> <li><a href="#">veterinarians</a></li> <li class="divider"></li> <li><a href="#">grooming</a></li> <li class="divider"></li> <li><a href="#">training</a></li> <li class="divider"></li> <li><a href="#">pet clubs</a></li> </ul> </li> </ul> </div> </body> </html>
all need add css:
.menu-mockup .nav-tabs { border-bottom: 0; }
working code snippet:
body { background-color: gray; } #home { padding: 11px; background-color: #64a3dd; color: white; border-radius: 3px; } .divider { width: 80%; } { color: #ffffff; } .dropdown { margin-right: 1px; margin-left: 1px; border-radius: 3px; background-color: #64a3dd; } .menu-mockup .nav-tabs { border-bottom: 0; }
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"> <body> <div class="menu-mockup" style="center"> <ul class="nav nav-tabs"> <li class="active"> <div id="home"> <a href="#"><i class="fa fa-home"></i></a> </div> </li> <li class="dropdown"> <a href="#" data-toggle="dropdown" class="dropdown-toggle">community</a> <ul class="dropdown-menu"> <li><a href="#">recent activity</a> </li> <li class="divider"></li> <li><a href="#">member forum</a> </li> <li class="divider"></li> <li><a href="#">member list</a> </li> <li class="divider"></li> <li><a href="#">member groups</a> </li> </ul> </li> <li class="dropdown"> <a href="#" data-toggle="dropdown" class="dropdown-toggle">pet help</a> <ul class="dropdown-menu"> <li><a href="#">pets dummies</a> </li> <li class="divider"></li> <li><a href="#">expected costs</a> </li> <li class="divider"></li> <li><a href="#">breeds</a> </li> <li class="divider"></li> <li><a href="#">pet quiz</a> </li> </ul> </li> <li class="dropdown"> <a href="#" data-toggle="dropdown" class="dropdown-toggle">pets sale</a> <ul class="dropdown-menu"> <li><a href="#">buying guide</a> </li> <li class="divider"></li> <li><a href="#">search location</a> </li> <li class="divider"></li> <li><a href="#">search species</a> </li> <li class="divider"></li> <li><a href="#">pet accessories</a> </li> </ul> </li> <li class="dropdown"> <a href="#" data-toggle="dropdown" class="dropdown-toggle">pet services</a> <ul class="dropdown-menu"> <li><a href="#">veterinarians</a> </li> <li class="divider"></li> <li><a href="#">grooming</a> </li> <li class="divider"></li> <li><a href="#">training</a> </li> <li class="divider"></li> <li><a href="#">pet clubs</a> </li> </ul> </li> </ul> </div> </body>
Comments
Post a Comment