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 trialWilliam Keely
7,295 PointsOverflow part was very unclear.
Why did he bring up the overflow part and then not explain how exactly it was solving the problem? He seemed to just say, "this overflow method works, but here's a better way". I would prefer if he explained exactly how the overflow property was solving the issue and then go on to give us the other solution.
1 Answer
Michael Lambert
6,286 PointsThe sizing calculations of floated elements are ignored which otherwise would normally be factored in so the container knows how to adjust its height to contain them. By using overflow: hidden for example creates a new block formatting context which forces the container to consider the sizes of the floated elements.