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

HTML

Ned Gonzalez
Ned Gonzalez
3,385 Points

Footer Problem

My footer is sitting at the bottom, but it is not touching the end of the browser. My footer has a colored background. There is a small white space between the footer and the end of the browser page. How should I resolve this issue?

This is the HTML code:

<footer> © Ned Gonzalez 2014. </footer>

This is the CSS code:

footer

{ background-color: #800000; bottom: 0px; color: #FFFFFF; font-family: "Avenir Next Condensed", Arial Narrow; height: 10px; margin-top: 550px; margin-bottom: -300px; margin-left: -10px; padding-top: 10px; padding-bottom: 25px; padding-right: 50px; text-align: center; width: 100%;
}

I can't seem to find the problem. Thanks!

1 Answer

Connor Hamilton
Connor Hamilton
5,023 Points

Why do you have so much margin?

The footer div should be the last thing on the html before your final </body> tag and will sit exactly at the bottom of the page. Maybe post your HTML or where your footer is in the HTML as you dont need all of the negative margins and padding for your footer to touch the bottom.