title: Bootstrap, make a navbar sticky after scrolling down?
body: <p>I have a navbar which is below the header image. I want the navbar to stick to the top of the webpage when I scroll down. I can't think of the jQuery or CSS required, because the navbar seems to stick right below the header image leaving some gap.</p>
  
  <pre><code>&lt;div class="headerwrap pull-center"&gt;
  &lt;div  class="container"&gt;
      &lt;div id="header" class="row-fluid"&gt;
          &lt;div class="span5" id="phones"&gt;
              &lt;img class="phone" src="img/white.png" alt=""&gt;
          &lt;/div&gt;
          &lt;div class="span7" id="mm-logo"&gt;
              &lt;img class="mm-log" src="img/logo.png" alt=""&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  
  
  &lt;div class="navbar navbar-inner" id="border-stuff"&gt;
      &lt;div class="span12"&gt;
  
          &lt;!-- .btn-navbar is used as the toggle for collapsed navbar content --&gt;
  &lt;a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"&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;/a&gt;
  
  &lt;!-- Everything you want hidden at 768px or less, place within here --&gt;
  &lt;div class="nav-collapse collapse" id="center-nav"&gt;
  &lt;ul class="nav" &gt;
      &lt;li&gt;&lt;a href="#h1"&gt;&lt;h3&gt;Heading1&lt;/h3&gt;&lt;/a&gt;&lt;/li&gt;&lt;li class="divider-vertical"&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#h2"&gt;&lt;h3&gt;Heading2&lt;/h3&gt;&lt;/a&gt;&lt;/li&gt;&lt;li      class="divider-vertical"&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#h3"&gt;&lt;h3&gt;Heading3&lt;/h3&gt;&lt;/a&gt;&lt;/li&gt;&lt;li class="divider-vertical"&gt;  &lt;/li&gt;
      &lt;li&gt;&lt;a href="#h4"&gt;&lt;h3&gt;Heading4&lt;/h3&gt;&lt;/a&gt;&lt;/li&gt;&lt;li class="divider-vertical"&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#h5"&gt;&lt;h3&gt;Heading4&lt;/h3&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>