home

Sticky footer with flexbox

Word count icon

23 words

Reading time icon

1 minutes

There are many ways to make a footer stick to the bottom of a page. The best way, in my opinion uses flexbox

CSS icon
html,
body {
height: 100%;
}
body {
display: flex;
flex-direction: column;
}
.content {
flex: 1 0 auto;
}
.footer {
flex-shrink: 0;
}