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 trialSeth Panter
1,305 Pointsfooter location
What is the best way to set the footer location to always be at the bottom of the page regardless of amount of content? For example, footer on home page looks great but on about page in ends up being up near the middle of the page. Thanks.
2 Answers
Akash malhotra
3,025 PointsMabye this
position:fixed;
bottom:0;
left:0;
}
John Norris
21,145 Points/* This should work */
footer {
position: fixed;
bottom: 0;
height: 30px;
width: 600px;
margin: 0 auto;
background: #3f3f3f;
}
Seth Panter
1,305 PointsSeth Panter
1,305 Pointsthat sorta worked. but now i can't get it centered?
Akash malhotra
3,025 PointsAkash malhotra
3,025 PointsSince I don't know how your div tags look like, try this:
If it's still screwing up, you can play with the padding like so:
padding: 10px 35px;