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

spacing

your h1 , nav has margins... , use class not affect every other h1 , nav tags.

h1.someclass {     margin-top: 0px; } nav.someclass {     margin-bottom:0px; } 

http://www.bootply.com/evit3piajb


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -