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

Richard Ward
Richard Ward
14,665 Points

What is meant by 'clearing' the fourth item?

I understand that 'clearing' the 4th item (or every 3n+1 item) resolves the layout issues in broad terms but i'm failing to understand the specific function of the 'clear' selector. i.e what precisely is happening when we use the clear: left; declaration?

1 Answer

Dwayne Pate
Dwayne Pate
12,249 Points

Clear is canceling the float property. In this case, you are specifically not allowing elements to float to the left of each 4th item, putting the next item on a new line.