You can use the sticky "footer" technique.
The idea is that the "footer" is positioned absolutely, in a container that has at least the full height of the page.
The structure is like this:
html, body {
height: 100%;
margin: 0;
padding: 0;
}
#container {
position: relative;
height: auto;
min-height: 100%;
background-color: green;
}
header {
background-color: red;
}
#content {
padding-bottom: 100px;
background-color: yellow;
}
footer {
position: absolute;
height: 100px;
width: 100%;
bottom: 0;
background-color: grey;
}
<div id="container">
<header id="header">El encabezado</header>
<div id="content">
<h2>Contenido</h2>
<p>
Contenido que no es tan largo
</p>
</div>
<footer id="footer">
El "footer" se posiciona de forma absoluta, y el padding inferior en #content evita que si la página es muy larga, este se superponga.
</footer>
</div>
Important to keep in mind that you must know the height of the footer.