css - How to just show hamburger icon of menu not the background bar and have the menu options in top-middle? -


i have menu following have issues it. example, in full size screen menu options not in middle-top of section located in. issue not know how remove black bar when screen in cell phone size , hamburger icon visible.

demo

   <!doctype html> <html lang="en"> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet"     href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">  <script     src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>   </head>  <body>  <header>     <div class="container-fluid">         <div class="row">              <div class="container">                 <div class="row">                     <div class=" col-md-12 col-sm-12 col-xs-12 search-container">                         <p>this test</p>                         <p>this test</p>                         <p>this test</p>                         <p>this test</p>                         <p>this test</p>                         <p>this test</p>                         <p>this test</p>                         <p>this test</p>                         <p>this test</p>                       </div>                 </div>             </div>             <nav class="navbar-inverse navbar-static-top" role="navigation">      <div class="container">         <div class="navbar-header">             <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">                 <span class="sr-only">toggle navigation</span>                 <span class="icon-bar"></span>                 <span class="icon-bar"></span>                 <span class="icon-bar"></span>             </button>         </div>          <!-- collect nav links, forms, , other content toggling -->         <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">             <ul class="nav navbar-nav">                 <li><a href="#">home</a></li>                 <li><a href="#">about</a></li>                 <li><a href="#portfolio">portfolio</a></li>                 <li><a href="#">contact</a></li>             </ul>         </div>     </div> </nav>             </div>     </div> </header> </body> </html> 

not sure middle top other part should work.

.navbar-inverse .navbar-nav > li > a:hover, .navbar-inverse .navbar-nav > li > a:focus, .navbar-inverse .navbar-nav > li > a{   padding: 10px !important; }   .navbar-header {     background-color: white; //or inherit whatever }   .navbar-toggle.collapsed {     background-color: black; } 

completed demo niklas brunberg


Popular posts from this blog