title: CSS Sticky Footer Margin
body: <p><strong>I do NOT want a FIXED footer, I need a STICKY footer.</strong></p>
  
  <p>My sticky footer worked fine at first but when the content is at a certain height, there is a margin between the footer and bottom of the page.</p>
  
  <p>Try messing with the browser height and content div height, and you should see where the problem is.</p>
  
  <p>It leaves an awkward margin between the footer and the bottom of the page.</p>
  
  <p>Thank you in advance.</p>
  
  <p><strong>CSS Code:</strong></p>
  
  <pre><code>html, body {
      height:100%;
      margin:0;
  }
  body {
      color:#FFF;
      font:16px Tahoma, sans-serif;
      text-align:center;
  }
  a {
      text-decoration:none;
  }
  #wrapper {
      height:100%;
      margin:0 auto;
      min-height:100%;
      padding-bottom:-30px;
      width:985px;
  }
  #content {
      background:#F00;
      height:950px;
  }
  #footer {
      background:#000;
      border-top:1px solid #00F0FF;
      clear:both;
      height:30px;
      margin-top:-30px;
      padding:5px 0;
      width:100%;
  }
  #footer span {
      color:#FFF;
      font-size:16px;
      padding-right:10px;
  }
  #push {
      clear:both;
      height:30px;
  }
  </code></pre>
  
  <p><strong>HTML Code:</strong></p>
  
  <pre><code>&lt;!DOCTYPE HTML&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Bad Footer&lt;/title&gt;
          &lt;link rel="stylesheet" href="badfooter.css" type="text/css"&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div id="wrapper"&gt;
          &lt;div id="content"&gt;
              &lt;span&gt;The footer leaves extra space at the bottom when you scroll all the way down. It starts out at the bottom for only the "Above the Fold" section (before scrolling it's at the bottom).&lt;/span&gt;
          &lt;/div&gt;
          &lt;div id="push"&gt;&lt;/div&gt;
      &lt;/div&gt;
      &lt;div id="footer"&gt;
          &lt;a href=""&gt;&lt;span&gt;About Us&lt;/span&gt;&lt;/a&gt;
          &lt;span&gt; | &lt;/span&gt;
          &lt;a href=""&gt;&lt;span&gt;Contact Us&lt;/span&gt;&lt;/a&gt;
          &lt;span&gt; | &lt;/span&gt;
          &lt;a href=""&gt;&lt;span&gt;Home&lt;/span&gt;&lt;/a&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p></p>