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 CSS Layout Basics Page Layout with the Float Property Footer Layout with Floats

Richard Targett
Richard Targett
4,960 Points

Lost with .clearfix, .clear, and .floats

Check me code. Im not sure where I need to clear both the footers. Am I to add an html into the mix?

1 Answer

John Satterfield
John Satterfield
13,695 Points

Hello Richard, I do not see your code posted to the forum, but as for the clearfix; you generally have a div class .clearfix located in your css file with the element clear:both; You would then call this in your html file after the floated element like this:

<div class="clearfix"></div>

This will clear most issues after floated elements on your page. For more information you can visit this page: http://www.sitepoint.com/clearing-floats-overview-different-clearfix-methods/

I hope this helps!