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

Sticky footer broke in this new chapter (Controlling Layout with CSS Display Modes)

So the sticky footer we did in the last chapter broke in this. It did not break completeley but a scroll bar still appears. You can see about half of the footer and you must scroll to see the rest.

I inspected it and the height is still the same, as well as the calc() function in the media querries.

Any ideas?

1 Answer

I had the same problem, because i didn't give the footer a fixed height the body elements pushed the footer and this code bellow fix it.

footer {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 100px;
    width: 100%;
}

Hope this was helpful and good luck.