title: How do you keep TwitterBootstrap's navbar fixed on top of the screen for applications with very long vertical page layouts?
body: <p>I downloaded the bootstrap template from <a href="http://www.initializr.com/" rel="nofollow noreferrer">http://www.initializr.com/</a> 
  My question is how do I keep the navbar fixed on top of the screen whenever I scroll down to the footer of my web page?  To have a better idea of what I'm trying to achieve I made a screenshot.</p>
  
  <p>example : <strong>On a mobile device perspective the NAVBAR is fixed</strong></p>
  
  <p><img src="https://i.stack.imgur.com/0DgAn.png" alt="NAVBAR IS FIXED ON TOP OF THE SCREEN"></p>
  
  <p>example : <strong>When I scroll down to the footer of the page I want the NAVBAR to stay fixed on top of the screen.  As you can see the NAVBAR fails to stay fixed on top of the screen.</strong></p>
  
  <p><img src="https://i.stack.imgur.com/HeSuZ.png" alt="enter image description here"></p>
  
  <p>CODE: </p>
  
  <pre><code>&lt;div class="navbar navbar-fixed-top"&gt;
              &lt;div class="navbar-inner"&gt;
                  &lt;div class="container"&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;a class="brand" href="#"&gt;&lt;img src="img/pldttranssmall.png"&gt;&lt;/a&gt;
                      &lt;div class="nav-collapse collapse"&gt;
                          &lt;ul class="nav"&gt;
                              &lt;li class="active"&gt;
                                  &lt;a href="#"&gt;Home&lt;/a&gt;
                              &lt;/li&gt;
                              &lt;li&gt;
                                  &lt;a href="#about"&gt;About&lt;/a&gt;
                              &lt;/li&gt;
                              &lt;li&gt;
                                  &lt;a href="#product"&gt;Product and Services&lt;/a&gt;
                              &lt;/li&gt;
                              &lt;li&gt;
                                  &lt;a href="#investor"&gt;Investor Relations&lt;/a&gt;
                              &lt;/li&gt;
                              &lt;li&gt;
                                  &lt;a href="#support"&gt;Get Support&lt;/a&gt;
                              &lt;/li&gt;
                          &lt;/ul&gt;
                          &lt;form class="navbar-form pull-right"&gt;
                              &lt;input class="span2" type="text" placeholder="Search"&gt;
                              &lt;button type="submit" class="btn btn-default"&gt;
                                  &lt;i class="icon-search icon-black"&gt;&lt;/i&gt;Go
                              &lt;/button&gt;
                          &lt;/form&gt;
                      &lt;/div&gt;&lt;!--/.nav-collapse --&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p><strong>How do I achieve this?</strong></p>