title: Sticky navbar using Bootstrap?
body: <p>Hi all I am trying to make the navbar that will stick to the page just after my header but when I make it fixed using the following code
  <code>&lt;div class="navbar navbar-default navbar-fixed-top"&gt;</code>
  <br>but when I do that the navbar overfloats the header and it doesnt work as it should.</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;div class="jumbotron"&gt;
    &lt;div class="container text-center"&gt;
      &lt;p&gt;"Blabla"&lt;/p&gt;
      &lt;h1&gt;blasa&lt;/h1&gt;
      &lt;p&gt;Ssasasasdsad sadsaas&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div class="navbar navbar-default navbar-fixed-top"&gt;
    &lt;nav class="navbar navbar-inverse"&gt;
      &lt;div class="container-fluid"&gt;
        &lt;div class="navbar-header"&gt;
          &lt;button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar"&gt;
            &lt;span class="icon-bar"&gt;&lt;/span&gt;
            &lt;span class="icon-bar"&gt;&lt;/span&gt;
            &lt;span class="icon-bar"&gt;&lt;/span&gt;
          &lt;/button&gt;
          &lt;a class="navbar-brand" href="index.html"&gt;sadsadasd&lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="collapse navbar-collapse" id="myNavbar"&gt;
          &lt;ul class="nav navbar-nav"&gt;
            &lt;li class="active"&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="#"&gt;hgfgfsf&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="#"&gt;dsasafew&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="#"&gt;dsadsaf&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="#"&gt;dsadasd&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="#"&gt;Cdas&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/nav&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Javascript</strong></p>
  
  <pre><code>jQuery(document).ready(function() {
    var navOffset = jQuery("nav").offset().top;
    jQuery(window).scroll(function() {
      var scrollPos = jQuery(window).scrollTop();
      if (scrollPos &gt;= navOffset) {
        jQuery("nav").addClass("fixed");
      } else {
        jQuery("nav").removeClass("fixrd");
      }
    });
  });
  </code></pre>
  
  <p><strong>CSS</strong></p>
  
  <pre><code>@media screen and (max-width: 767px) {
    .sidenav {
      height: auto;
      padding: 15px;
    }
    .row.content {
      height: auto;
    }
  }
  
  .fixed {
    position: fixed;
    top: 0;
  }
  </code></pre>
  
  <p>I would be greatful if you could help me :)</p>
  
  <p>Thanks</p>