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

Hi there, I don't quite get the logic of how footer is included with the #gallery li for float > back to footer.

As stated:

gallery li doesn't include footer. But when float is written, it follows suit so we need to go back to footer to write: clear: both.

I don't quite get the logic on this part. Or did I miss out any info here?

Thanks!

2 Answers

Michael Fish
Michael Fish
7,804 Points

Floats are confusing at first. Basically using clear allows you to keep certain elements from floating. Check this video out it does a good job of explaining visually. https://www.youtube.com/watch?v=xara4Z1b18I

Samuel Benson
Samuel Benson
2,496 Points

Thanks Michael - another css style bites the dust..

Thank you. : )

Michael Fish
Michael Fish
7,804 Points

No problem guys. I never thought I would be answering more than I was asking. You will be answering some in no time too! =]