Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS CSS Layout Basics Getting Started with CSS Layout Creating a Sticky Footer

Nattapol Kamolbal
Nattapol Kamolbal
15,528 Points

Sticky footer with undefined height

The method showed in this video worked well with known height footer. But when it comes to undefined height footer, like WordPress theme's footers, this method doesn't work. Are there alternatives to solve this problem?

2 Answers

Guil Hernandez
STAFF
Guil Hernandez
Treehouse Teacher

Hi Nattapol Kamolbal,

This video will teach you how to create a sticky footer with an undefined height using flexbox.

Hope this helps. :)

thnx Guil

Nattapol Kamolbal
Nattapol Kamolbal
15,528 Points

Thank you :) Plan to take this course next.

give footer bottom offset of 0 & position:absolute...

i think it work

Nattapol Kamolbal
Nattapol Kamolbal
15,528 Points

I tried using position:absolute as you suggest, combined with bottom: 0; The footer sticked to the bottom very well but the problem is that it didn't take up space which make the content go through the footer.