title: Getting Affix to work for nav and navbar
body: <p>I have some html for a layout for a page for a site for software library my research group made. This is done with bootstrap 3. What I would like to achieve is the navbar that occurs just below the jumbotron to become fixed to the top of the page once it get's scrolled up there. I'd also like similar behaviour for the nag element in the left column of the page - when the page is scrolled and they reach the top - that they then become fixed and stay there. From reading I understand that Affix in twitter bootstrap is the way to go about doing this, but I'm not entirely sure I can figure how to do this right.</p>
  
  <p>With the HTML below what happens is after scrolling so far the navbar which should span the page becomes squashed - the navbar links move to one row below the navbar brand and the bar nolonger spans the page. Once I figure out how to use affix with the navbar I hope to use it with the nav element. Can anyone explain what I need to do to get the effect? I'm fairly new to web design stuff.</p>
  
  <p>Thanks,
  Ben.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta charset="utf-8"&gt;
          &lt;title&gt;SOFTWARE - GETTING STARTED WITH SOFTWARE&lt;/title&gt; 
          &lt;link rel="stylesheet" href="css/bootstrap.css" type="text/css"/&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;style&gt;
              .jumbotron {
                  margin-bottom: 0px;
              }
          &lt;/style&gt;
          &lt;!-- Start of main container --&gt;
          &lt;div class="container-fluid main"&gt;
              &lt;div class="row-fluid"&gt;
                  &lt;div class="jumbotron"&gt;
                      &lt;h1&gt; Getting Started &lt;/h1&gt;
                      &lt;p&gt; Installing SOFTWARE on your machine is easy for most systems.
                          This guide will get you up and running.
                      &lt;/p&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
                      &lt;!--Here's thestart of the navabar I'm trying to affix --&gt;
              &lt;div class="row-fluid" data-spy="affix" data-offset-top="200"&gt;
                  &lt;div class="navbar navbar-inverse"&gt;
                      &lt;div class="navbar-header"&gt;
                          &lt;a class="navbar-toggle" 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="navbar-brand" href="#"&gt;SOFTWARE&lt;/a&gt;
                      &lt;/div&gt;
                      &lt;div class="navbar-collapse collapse"&gt;
                          &lt;ul class="nav navbar-nav"&gt;
                              &lt;li&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/li&gt;
                              &lt;li&gt;&lt;a href="#"&gt;About SOFTWARE&lt;/a&gt;&lt;/li&gt;
                              &lt;li class="active"&gt;&lt;a href="#"&gt;Getting Started&lt;/a&gt;&lt;/li&gt;
                              &lt;li&gt;&lt;a href="#"&gt;Quick Start&lt;/a&gt;&lt;/li&gt;
                              &lt;li&gt;&lt;a href="#"&gt;Full Documentation&lt;/a&gt;&lt;/li&gt;
                              &lt;li&gt;&lt;a href="#"&gt;Contact&lt;/a&gt;&lt;/li&gt;
                              &lt;li class="dropdown"&gt;
                                  &lt;a href="#" class="dropdown-toggle" data-toggle="dropdown"&gt;Download &lt;b class="caret"&gt;&lt;/b&gt;&lt;/a&gt;
                                  &lt;ul class="dropdown-menu"&gt;
                                      &lt;li&gt;&lt;a href="#"&gt;GitHub Repository&lt;/a&gt;&lt;/li&gt;
                                      &lt;li&gt;&lt;a href="#"&gt;Download TAR&lt;/a&gt;&lt;/li&gt;
                                      &lt;li&gt;&lt;a href="#"&gt;Download ZIP&lt;/a&gt;&lt;/li&gt;
                                  &lt;/ul&gt;
                              &lt;/li&gt;
                          &lt;/ul&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;  
              &lt;/div&gt;
              &lt;!-- Begin Layout for Getting Started Page --&gt;
              &lt;div class="row-fluid"&gt;
                  &lt;div class="col-lg-3"&gt;
                      &lt;ul class="nav nav-pills nav-stacked sidemenu"&gt;
                          &lt;li&gt;&lt;a href="#"&gt;Introduction&lt;/a&gt;&lt;/li&gt;
                          &lt;li&gt;&lt;a href="#"&gt;Installing R&lt;/a&gt;&lt;/li&gt;
                          &lt;li&gt;&lt;a href="#"&gt;R Recommendations&lt;/a&gt;&lt;/li&gt;
                          &lt;li&gt;&lt;a href="#"&gt;Installing HybRIDS from GitHub&lt;/a&gt;&lt;/li&gt;
                          &lt;li&gt;&lt;a href="#"&gt;Installing HybRIDS from Source File&lt;/a&gt;&lt;/li&gt;
                          &lt;li&gt;&lt;a href="#"&gt;Installing HybRIDS from Binary File&lt;/a&gt;&lt;/li&gt;
                      &lt;/ul&gt;
                  &lt;/div&gt;
                  &lt;div class="col-lg-9 whitep"&gt;
                      &lt;h1 class="whitep"&gt;Introduction&lt;/h1&gt;
                      &lt;p&gt;
                          Installation text
                          Installation text
                          Installation text
                          Installation text
                          Installation text
                      &lt;/p&gt;
                      &lt;hr&gt;
                      &lt;h1&gt;Installing R&lt;/h1&gt;
                      &lt;p&gt;
                          R is simple to install for most operating systems. If you use a Mac or PC or Linux system, the process for installing it is like for installing any other software on that system. 
                      &lt;/p&gt;
                      &lt;p&gt;
                      TEST text to fill page to test scrolling behaviour...
                      &lt;/p&gt;
                      &lt;p&gt;
                      TEST
                      &lt;/p&gt;
                      &lt;p&gt;
                      TEST
                      &lt;/p&gt;
                      &lt;p&gt;
                      TEST
                      &lt;/p&gt;
                      &lt;p&gt;
                      TEST
                      &lt;/p&gt;
                      &lt;p&gt;
                      TEST
                      &lt;/p&gt;
                      &lt;p&gt;
                      TEST
                      &lt;/p&gt;
                      &lt;p&gt;
                      TEST
                      &lt;/p&gt;
                      &lt;p&gt;
                      TEST
                      &lt;/p&gt;
                      &lt;p&gt;
                      TEST
                      &lt;/p&gt;
                      &lt;p&gt;
                      TEST
                      &lt;/p&gt;
                      &lt;p&gt;
                      TEST
                      &lt;/p&gt;
                      &lt;p&gt;
                      TEST
                      &lt;/p&gt;
                      &lt;p&gt;
                      TEST
                      &lt;/p&gt;
                      &lt;p&gt;
                      TEST
                      &lt;/p&gt;
                      &lt;p&gt;
                      TEST
                      &lt;/p&gt;    
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt; &lt;!--End of main Container--&gt;
          &lt;script src="http://code.jquery.com/jquery-1.10.1.min.js"&gt;&lt;/script&gt;
          &lt;script src="js/bootstrap.js"&gt;&lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>