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 Introducing the Project

Mendel Konikov
Mendel Konikov
5,602 Points

What am I doing wrong with .clearfix? Can't get the footer to be cleared from floating columns.

How do I get clearfix for clear after?

I applied the class to the last column (.tertiary) but it's not clearing and footer is bumping up.

4 Answers

Steven Parker
Steven Parker
231,248 Points

It's just a guess without seeing your code, but you probably don't want to apply a clearfix to a column. It would more likely be applied to the container of the column.

It would help if you posted your code

Mendel Konikov
Mendel Konikov
5,602 Points

Thanks!

Why won't it work without adding a container to column?

P.S. How do I post my code?

[MOD: editing to insert a code demo - sh]

<!-- code in here -->
<h1>A Heading</h1>

You can post your code by copying and pasting into here, BUT you must have three backticks on the line before, and the line after your code, else it gets parsed. So, like this:

<!-- code in here -->
<h1>A Heading</h1>

I have edited your answer to include the same block of code. If you edit your own answer, you can see what I have done.

Steve.