Ryan Faitのスティッキーフッターはとてもいいですが、基本的な構造が欠けていると思います*。
フレックスボックスのバージョン
幸運なことに、古いブラウザをサポートしなくてもフレックスボックスを使用できる場合は、スティッキフッターが簡単になり、動的にサイズ変更されるフッターをサポートします。
フレックスボックスを使用してフッターを下部に固定するコツは、同じコンテナ内の他の要素を垂直方向にフレックスすることです。必要なのは、フルサイズのラッパー要素display: flexと、次のflex値よりも大きい値を持つ少なくとも1つの兄弟です0。
CSS:
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}
#main-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
article {
  flex: 1;
}
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}
#main-wrapper {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  min-height: 100%;
}
article {
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
}
header {
  background-color: #F00;
}
nav {
  background-color: #FF0;
}
article {
  background-color: #0F0;
}
footer {
  background-color: #00F;
}
<div id="main-wrapper">
   <header>
     here be header
   </header>
   <nav>
   </nav>
   <article>
     here be content
   </article>
   <footer>
     here be footer
   </footer>
</div>
 
 
flexboxを使用できない場合、選択する基本構造は次のとおりです。
<div class="page">
  <div class="page__inner">
    <header class="header">
      <div class="header__inner">
      </div>
    </header>
    <nav class="nav">
      <div class="nav__inner">
      </div>
    </nav>
    <main class="wrapper">
      <div class="wrapper__inner">
        <div class="content">
          <div class="content__inner">
          </div>
        </div>
        <div class="sidebar">
          <div class="sidebar__inner">
          </div>
        </div>
      </div>
    </main>
    <footer class="footer">
      <div class="footer__inner">
      </div>
    </footer>
  </div>
</div>
これはそれほど遠くないわけではありません。
<div id="main-wrapper">
    <header>
    </header>
    <nav>
    </nav>
    <article>
    </article>
    <footer>
    </footer>
</div>
フッターを貼り付けるコツは、フッターをその含まれている要素の下のパディングに固定することです。これには、フッターの高さが静的である必要がありますが、フッターは通常、静的な高さであることがわかりました。
HTML:
<div id="main-wrapper">
    ...
    <footer>
    </footer>
</div>
CSS:
#main-wrapper {
    padding: 0 0 100px;
    position: relative;
}
footer {
    bottom: 0;
    height: 100px;
    left: 0;
    position: absolute;
    width: 100%;
}
#main-wrapper {
  padding: 0 0 100px;
  position: relative;
}
footer {
  bottom: 0;
  height: 100px;
  left: 0;
  position: absolute;
  width: 100%;
}
header {
  background-color: #F00;
}
nav {
  background-color: #FF0;
}
article {
  background-color: #0F0;
}
footer {
  background-color: #00F;
}
<div id="main-wrapper">
   <header>
     here be header
   </header>
   <nav>
   </nav>
   <article>
     here be content
   </article>
   <footer>
     here be footer
   </footer>
</div>
 
 
フッターがに固定されているため#main-wrapper、#main-wrapper子が長くない限り、少なくともページの高さである必要があります。これは、することによって行われ#main-wrapperていmin-heightのを100%。また、その親ということを覚えている、htmlとbody、ページと同じ高さである必要があることおく必要があります。
CSS:
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}
#main-wrapper {
    min-height: 100%;
    padding: 0 0 100px;
    position: relative;
}
footer {
    bottom: 0;
    height: 100px;
    left: 0;
    position: absolute;
    width: 100%;
}
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}
#main-wrapper {
  min-height: 100%;
  padding: 0 0 100px;
  position: relative;
}
footer {
  bottom: 0;
  height: 100px;
  left: 0;
  position: absolute;
  width: 100%;
}
header {
  background-color: #F00;
}
nav {
  background-color: #FF0;
}
article {
  background-color: #0F0;
}
footer {
  background-color: #00F;
}
 <div id="main-wrapper">
   <header>
     here be header
   </header>
   <nav>
   </nav>
   <article>
     here be content
   </article>
   <footer>
     here be footer
   </footer>
</div>
 
 
もちろん、コンテンツがない場合でも、このコードはフッターがページの下部から落ちるのを強制するため、私の判断に疑問を投げかける必要があります。最後のトリックはで使用されるボックスモデルに変更することである#main-wrapperようにmin-heightするには100%含まれて100pxパディングを。
CSS:
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}
#main-wrapper {
    box-sizing: border-box;
    min-height: 100%;
    padding: 0 0 100px;
    position: relative;
}
footer {
    bottom: 0;
    height: 100px;
    left: 0;
    position: absolute;
    width: 100%;
}
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}
#main-wrapper {
  box-sizing: border-box;
  min-height: 100%;
  padding: 0 0 100px;
  position: relative;
}
footer {
  bottom: 0;
  height: 100px;
  left: 0;
  position: absolute;
  width: 100%;
}
header {
  background-color: #F00;
}
nav {
  background-color: #FF0;
}
article {
  background-color: #0F0;
}
footer {
  background-color: #00F;
}
 <div id="main-wrapper">
   <header>
     here be header
   </header>
   <nav>
   </nav>
   <article>
     here be content
   </article>
   <footer>
     here be footer
   </footer>
</div>
 
 
これで、元のHTML構造を持つスティッキーフッターができました。ちょうどことを確認するfooterのがheightに等しい#main-wrappers 'はpadding-bottom、あなたが設定する必要があります。
* Faitの構造に欠陥があるのは、不要な要素を追加しながら.footerと.header要素を異なる階層レベルに設定するため.pushです。