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 How to Make a Website Styling Web Pages and Navigation Polish the Navigation and Footer

Raghav Agrawal
Raghav Agrawal
4,654 Points

why my footer is being pulled just below the image?

my footer is being displayed below the fourth image instead of the bottom of the page

here is my relevant html and css output

2 Answers

Markus Ylisiurunen
Markus Ylisiurunen
15,034 Points

Hi Raghav!

You should try to add a new property to your footer called clear: both;. This will clear both sides of your footer from floated elements and it should push it to the bottom of your page.

Add this to your style.css and it should work.

footer {
    clear: both;
}
Raghav Agrawal
Raghav Agrawal
4,654 Points

thank you sir,also how is your code in a grey box?

Markus Ylisiurunen
Markus Ylisiurunen
15,034 Points

You're welcome! You can see how to do that by clicking "Markdown Cheatsheet" button on top of your "Post comment/Post answer" button. It'll pop up a little text box.

Wilfredo Laboy
Wilfredo Laboy
2,019 Points

could you post the code? I don't feel comfortable downloading anything. As I am sure a few other people might feel the same way.

Raghav Agrawal
Raghav Agrawal
4,654 Points

sorry sir,i'll bear that in mind next time,for now i got my answer thanks to Markus Y