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.

CSS CSS Layout Techniques Display Modes Column Layout with Inline-Block

Terry Eminhizer
Terry Eminhizer
2,165 Points

Why is the footer always 'off screen'?

Windows 8.1 / Chrome

I'm curious to know why the footer is only visible upon scrolling the page down no matter what the corresponding browser window is sized to vertically. What styles would have the footer stick directly to the bottom of the window? It appears that Guil was scrolling too in the lesson but I can't be sure on account of not knowing the details of that setup.

Thanks! -terry

2 Answers

If you use

footer {
  position: fixed;
  bottom: 0px;
}

I believe it will fix the footer to the bottom of the page

Andrew Robinson
Andrew Robinson
16,372 Points

I'm not sure why but the code he uses:

html,
body,
.main-wrapper,
.col {
  height: 100%;
}

Seems to set the .col height to the browser window height which pushes the footer off the page constantly.

Colton's code above works but you will need to set width: 100% and I think the footer may overlay the bottom of the columns also.