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 How to Make a Website Adding Pages to a Website Style New Pages

footer 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
Akash malhotra
3,025 Points

Mabye this

 position:fixed;
 bottom:0;
 left:0;
}

that sorta worked. but now i can't get it centered?

Akash malhotra
Akash malhotra
3,025 Points

Since I don't know how your div tags look like, try this:

    bottom: 0px;  
    position: Fixed;  
    width: 100%;  

If it's still screwing up, you can play with the padding like so:

   padding: 10px 35px;
/* This should work */


footer {
   position: fixed;
   bottom: 0;
   height: 30px;
   width: 600px;
   margin: 0 auto; 
   background: #3f3f3f;
}