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 Responsive Web Design and Testing Build a Three Column Layout

Michael Rathbun
Michael Rathbun
1,624 Points

I'm not following what you mean by "clear". I get the concept behind the problem but not what "clear" means?

A shot in the dark here: Is "clear" describing a clearing of space for the column code to reset itself from that point ?

Sam Portillo
Sam Portillo
2,640 Points

Hi Michael,

When you are using the float property, elements will appear to be side-by-side. Clear allows you to reset a specific element such that it won't inherit the float property.

For example, if you are floating all elements in a body (which includes a footer element), but you want to have your footer element exempt from this inheritance, you can remove the float property from the footer element by styling the footer CSS in this way:

footer{ clear: both; }

Hope this makes a little more sense.

1 Answer

From the MDN docs for the clear property:

The clear CSS property specifies whether an element can be next to floating elements that precede it or must be moved down (cleared) below them.