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 How to Make a Website Styling Web Pages and Navigation Style the Image Captions

Float property

Hi,

I just wanted to understand one thing: How is the footer floating around with other images while it was not selected in this video? After adding a "clear" property with a " both" value, the footer has been pushed back down.

We only applied the "float" to the "#gallery li".

Thank you for making this clear to me.

2 Answers

Dave McFarland
STAFF
Dave McFarland
Treehouse Teacher

The footer doesn't actually "float". It's wrapping AROUND the floated images. If there was more content in the footer you would see that it no only appears NEXT to that last image, but also BELOW that image. That's the purpose of the clear property -- it stops an element that follows a floated element from wrapping around the floated element.

Oh...great...thank you so much, that really helped, I went around and pasted lots of text, and refreshed my page, and the text wrapped around the image. I really appreciate that.