title: header, main and footer positioning
body: <p>My page is divided in to 3 pieces. The <strong>header</strong> the <strong>main</strong> and the <strong>footer</strong>. The <strong>header</strong> is fixed to the top and is 109px with its 6px border high so the <strong>main</strong> has a 109px margin to the top. I want the <strong>main</strong> to extend over the entire page below the <strong>header</strong> and to the <strong>footer</strong> that should, if no content that is available to push it down, rest on the bottom of the screen. The <strong>footer</strong> is 86px high because it is 80px and 6px for a border at the top. How can I achieve all this. I have no Idea</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>html {
    height: 100%;
    box-sizing: border-box;
  }
  
  body {
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
    position: relative;
    margin: 0;
    padding-bottom: 9rem;
    min-height: 100%;
  }
  
  
  /* ---------------------------------------------------------------- */
  
  main {
    margin-top: 109px;
    text-align: center;
    min-height: 100%;
    min-width: 100%;
  }
  
  #header {
    background-color: #25211e;
    border-bottom: 6px solid #1d1a18;
    text-align: center;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 103px;
    box-shadow: 0px 0px 14px 2px rgba(0, 0, 0, 0.75);
    z-index: 99;
  }
  
  #heading {
    font-family: "Arial";
    color: #c1b497;
    font-size: 45px;
    display: inline-block;
    margin-bottom: 10px;
    margin-top: 15px;
  }
  
  
  /* ---------------------------------------------------------------- */
  
  #footer {
    background-color: #25211e;
    border-top: 6px solid #1d1a18;
    text-align: center;
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 80px;
    z-index: 98;
  }
  
  #credit {
    font-family: "Helvetica";
    font-size: 14px;
    color: #c1b497;
    font-weight: 600;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="all"&gt;
    &lt;header id="header"&gt;
      &lt;h1 id="heading"&gt;My Page&lt;/h1&gt;
    &lt;/header&gt;
    &lt;main id="main"&gt;
  
  
  
    &lt;/main&gt;
    &lt;footer id="footer"&gt;
      &lt;p id="credit"&gt;FOOTER&lt;/p&gt;
    &lt;/footer&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>