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 CSS Layout Project Column Layout with Media Queries

Luqman Shah
Luqman Shah
3,016 Points

Why isn't the clearfix working?!

(https://w.trhou.se/v2ficop76l)

I reviewed my code with his code through each video, but I can't pin point what I did wrong, it looks the same, the results are the same, except the clearfix results, mine just won't work. Please review my code!

1 Answer

Gabbie Metheny
Gabbie Metheny
33,778 Points

In style.css, you didn't close your comment on line 143 for .tagline, so that commented out your closing bracket for .tagline and messed up your .clearfix code block. Just close that comment, and you should be fine!

Also noticed when reviewing your code that on line 92, you have a second padding-right declaration instead of a padding-left one. Won't affect the clearfix, though!

Let me know if closing that comment doesn't fix the collapsing divs!

Luqman Shah
Luqman Shah
3,016 Points

Omg amazing observation skills, I kept reviewing my code but just couldn't pick anything up. Who knew it was something so simple yet so common, a syntax error. It worked btw, big help thanks a lot Gabbie!

Gabbie Metheny
Gabbie Metheny
33,778 Points

You bet! It's those tiny things that are the hardest to debug, but practice makes perfect, or close to it!