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 The Float Challenge Solution

Mike McKnight
Mike McKnight
6,717 Points

I added the clearfix because I knew I had to but I don't think I needed to.

As the question states, I added the clearfix solely because I knew we were supposed to per the instructions. But the way I did my layout nothing really collapsed like Guil's did in the explanation. My code is here https://w.trhou.se/lzn5m02t0d

Any reason why mine didn't? And if not why wouldn't he just do it this way?

1 Answer

Steven Parker
Steven Parker
231,072 Points

I'm not sure why you didn't see it, but if you remove the "clearfix" class from the "container" element, the headers collapses just like in the video.

Also, while it doesn't hurt anything, I noticed that you have two ".clearfix" rules in your CSS.