css - Bootstrap Navbar Unexpected Bottom Spacing -
this has been asked several times.  i've checked several different answers, , found no resolution in of them.  i've set margin-bottom: 0 navbar.  i'm not using fixed-top navbar.  html tags closed.  none of resolution in questions i've seen have helped.
the mcve super simple. feel answer must well, first experience bootstrap, , don't see it. here's bootply. completeness, i'll copy material here.
html
<!-- navigation bar --> <nav class="navbar navbar-default">   <div class="container-fluid">     <div class="navbar-header">       <a class="navbar-brand" href="#">brand</a>     </div>     <ul class="nav navbar-nav">       <li onclick="navigatetosettings()" id="settingsheaderitem"><a href="#">settings</a></li>       <li><a href="#">page 1</a></li>       <li><a href="#">page 2</a></li>        <li><a href="#">page 3</a></li>      </ul>   </div> </nav>  <!-- content pane --> <div id="contentpane" class="contentpane">   <h1>test</h1> </div>   css
.navbar {   margin-bottom: 0; }  .contentpane {   background-color: black; }   result
your h1 , nav has margins... , use class not affect every other h1 , nav tags.
h1.someclass {     margin-top: 0px; } nav.someclass {     margin-bottom:0px; }        
Comments
Post a Comment