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

Voyti 1
Voyti 1
1,854 Points

Why "clear: left;" solves the problem of the wrapped caption from the 1st line, pushing out images from the 2nd line?

Just a question from the title

2 Answers

Josué Rodriguez
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Josué Rodriguez
Front End Web Development Techdegree Graduate 24,118 Points

Hi Wojti Sap
Simply put it tells the images to sit bellow the previous one rather than continue wrapping around. Take a look at the teachers note for an updated method as it's a correction to the video.

Also here is some further reading to help understand what's going on:

A List Apart CSS Floats 101

The clear property has five values available: left, right, both, inherit, and none. Assigning a value of left says the top edge of this element must sit below any element that has the float: left property applied to it. The same concept applies for the right value—the element must sit beneath any element that has the float: right property applied to it. Using the both value tells our element that its top edge must sit below any element floated either left or right. The inherit value takes on the clear property from its parent element, while the default value none behaves as you would expect.

CSS Tricks All About Floats

Voyti 1
Voyti 1
1,854 Points

Thank you Josue! You made it very clear and simple