In this episode, we tackle a common web design challenge: making a responsive sticky footer that actually works well across different screen sizes and with variable content amounts. You’ll see why this problem is trickier than it seems, because the footer should always stick to the bottom when there’s not much content, but get pushed down naturally when the page is long.
We step through a clever CSS “hack” solution using table display properties—so no actual HTML tables involved! First, we set up basic HTML structure with a wrapper for content and a footer area. As we work in CSS, you’ll see how setting display: table
on the html and body, and then using display: table-row
for the footer, gets things working reliably. We'll also talk about why we need some extra wrappers or padding to keep things looking nice.
After adding some styles (and a little color to the footer), we experiment by throwing in more content. You’ll see that the sticky footer works as expected—the footer moves down when you add content but stays at the bottom on shorter pages. Best of all, this trick doesn't require any strange “push” classes or extra empty elements, so the markup stays clean and simple.
By the end, you’ll know a solid, straightforward way to make your footers behave, and your layouts will be a bit more robust!