html,
body {
    height: 100%;
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
}

footer {
    margin-top: auto;
}