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 How to Make a Website Styling Web Pages and Navigation Style the Image Captions

Clear:both; not working

For some reason the Clear:both; command isn't working and the footer is still floating in the gallery instead of below it. Everything was working as it should up until this point. Any ideas?

*************************
FOOTER
*************************/

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


/*************************
PAGE: PORTFOLIO
*************************/
#gallery{
  margin:0;
  padding:0;
  list-style: none;
}

#gallery li {
  float: left;
  width: 45%;
  margin: 2.5%;
  background-color: #f5f5f5;
  color: #bdc3c7;
}

#gallery li a p {
  margin: 0;
  padding: 5%;
  font-size: 0.75em;
  color: #bdc3c7;
}

2 Answers

Jason Cook
Jason Cook
11,403 Points

Daniella,

The problem is with the missing forward slash ( / ) in the comment block, above your footer type selector. After fixing that, your issue will be resolved.

Before Correction

************************************
 FOOTER
************************************/

After Correction

/************************************
 FOOTER
************************************/

The only other issue I saw, is the missing semicolon after your color declaration line, but that's not causing any noticeable rendering issues.

I hope this helps! Happy coding! :-)

That was it! Thank you :)

Jason Cook
Jason Cook
11,403 Points

You're welcome :)