Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.


Can someone help me?

Can someone help me with this gray footer? I want an effect when I don't have to scroll to see the footer. I set the minimum height of the header and main section elements of 100vh - 89px (89px is the footer height) and its still not working. This whole task is bade on "Creating a sticky footer" video ("Getting started with CSS Layout" section of CSS Layout Basics Course).


1 Answer

Steven Parker
Steven Parker
220,378 Points

You're pretty close, just a few more adjustments needed:

  • "min-height" won't constrain the size, use "max-height" or just "height"
  • you may want to add "overflow: auto;" to allow the "wrap" area to scroll
  • you may need to leave a bit more space for margins to avoid a double scrollbar
  • you could also eliminate the outer scrollbar with "body { overflow: hidden; }"