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.

HTML How to Make a Website Responsive Web Design and Testing Adjust the Profile Page and Header

Sam Queen
Sam Queen
710 Points

Why won't my footer stay at the bottom of my webpage?

I can't get my footer to stay at the bottom of my page. I don't know where i messed up. I used the "clear: both;" rule in my CSS, but it doesn't seem to be doing the trick. Help would be greatly appreciated thank you.

Sam Queen
Sam Queen
710 Points

This is my HTML

<footer>
      <a href="twitter.com"><img src="img/twitter-wrap.png" alt="Twitter Logo" class="social-icon"></a>
      <a href="google.com"><img src="img/facebook-wrap.png" alt="Facebook Logo" class="social-icon"></a>
      <p>&copy; 2017 Sam Queen.</p>
    </footer> 

and this is my CSS

******************/
Footer
******************/
footer{
 font-size: 0.75em;
  text-align: center;
  clear: both;
  padding-top: 50px;
  color: #ccc;


}

.social-icon{
  width: 20px;
  height: 20px;
  margin: 0 5px;
}

1 Answer

Scott Neville
Scott Neville
10,070 Points

Hi Sam, Where is the footer placed within the HTML? is it at the very end of your code?