title: bootstrap - full background image with nav bar over the top
body: <p>I am trying to create a full background image page with a nav bar that floats on top the image.</p>
  
  <p>I am getting a problem in that the navbar pushes the image down, the image is set on the background of the html element so I dont know why the navbar is having this effect.</p>
  
  <p>I am just using the css straight off the bootstrap getting started page and without the navbar the image fits the entire page, with the navbar it sits above the image and pushes it down:</p>
  
  <p>Css:</p>
  
  <pre><code>html{
              /* This image will be displayed fullscreen */
              background:url('bg.jpg') no-repeat center center;
  
              /* Ensure the html element always takes up the full height of the browser window */
              min-height:100%;
  
              /* The Magic */
              background-size:cover;
          }
  
          body {
              /* Workaround for some mobile browsers */
              min-height:100%;    
              padding-top: 20px;
              padding-bottom: 20px;           
          }
  
          .navbar {
              margin-top: 0px;
              margin-bottom: 0px;
          }
  </code></pre>
  
  <p>Html:</p>
  
  <pre><code>    &lt;body&gt;
      &lt;div class="container"&gt;
          &lt;nav class="navbar navbar-default navbar-custom" role="navigation"&gt;
              &lt;div class="container-fluid"&gt;
                &lt;!-- Brand and toggle get grouped for better mobile display --&gt;
                &lt;div class="navbar-header"&gt;
                  &lt;button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse"&gt;
                    &lt;span class="sr-only"&gt;Toggle navigation&lt;/span&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="#"&gt;Brand&lt;/a&gt;
                &lt;/div&gt;
  
                &lt;!-- Collect the nav links, forms, and other content for toggling --&gt;
                &lt;div class="collapse navbar-collapse navbar-ex1-collapse"&gt;
                  &lt;ul class="nav navbar-nav"&gt;
                    &lt;li class="active"&gt;&lt;a href="#"&gt;Link 1&lt;/a&gt;&lt;/li&gt;
                    &lt;li&gt;&lt;a href="#"&gt;Link 2&lt;/a&gt;&lt;/li&gt;
                    &lt;li class="dropdown"&gt;
                      &lt;a href="#" class="dropdown-toggle" data-toggle="dropdown"&gt;Dropdown &lt;b class="caret"&gt;&lt;/b&gt;&lt;/a&gt;
                      &lt;ul class="dropdown-menu"&gt;
                        &lt;li&gt;&lt;a href="#"&gt;Action&lt;/a&gt;&lt;/li&gt;
                        &lt;li&gt;&lt;a href="#"&gt;Another action&lt;/a&gt;&lt;/li&gt;
                        &lt;li&gt;&lt;a href="#"&gt;Something else here&lt;/a&gt;&lt;/li&gt;
                        &lt;li&gt;&lt;a href="#"&gt;Separated link&lt;/a&gt;&lt;/li&gt;
                        &lt;li&gt;&lt;a href="#"&gt;One more separated link&lt;/a&gt;&lt;/li&gt;
                      &lt;/ul&gt;
                    &lt;/li&gt;
                  &lt;/ul&gt;
  
                  &lt;/div&gt;&lt;!-- /.navbar-collapse --&gt;
              &lt;/div&gt;
          &lt;/nav&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>The effect that I want to end up with is an image of the entire page and the nav bar sat with the image showing under it, not pushing the image down so it starts after the navbar.</p>