title: Why position sticky doesn't work for the footer
body: <p>I just found out about position sticky in CSS. I thought this is really cool and eliminates the need of writing a JS function for this simple behaviour.</p>
  
  <p>So, I thought I give it a try. In the following example the header is sticking to the top, but I don't understand why the footer is not sticking to the bottom:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>body {
    height: 180vh;
    padding: 0;
    margin: 10px 0;
  }
  
  header,
  footer {
    position: -webkit-sticky;
    position: sticky;
    padding: 10px;
    color: #ffffff;
    text-align: center;
  }
  
  header {
    top: 0;
    background-color: brown;
  }
  
  footer {
    bottom: 0;
    background-color: #2d3142;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;header&gt;I'm sticking to the top of the page&lt;/header&gt;
  &lt;footer&gt;I'm sticking to the Bottom of the page&lt;/footer&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Why is that?</p>