<div class="contenedor"> <header>Header</header> <section> Contenido principal. </section> </div> <footer>Footer</footer>
body{ padding: 0; margin: 0; } header, footer{ padding: 20px; color: white; background-color: black; text-align: center; } section{ padding: 20px; text-align: center; } /*soluciĆ³n final*/ html, body{ height:100%; } .contenedor{ min-height: 100%; padding-bottom: 60px; box-sizing: border-box; } footer{ margin-top: -58px; }