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 CSS Layout Techniques Float Layout The Float Clearfix

Wrapped Elements

When the video shows this solution to the collapsed parent:

.main-header {
  float: left;
  width: 70%;
}

Why doesn't the whole div below the main-header wrap as well? Only the <h1> in the div below the main-header seems to wrap. Headings are block level elements just like divs, so I'm confused why the whole column doesn't wrap.

Christian Lawrence
Christian Lawrence
3,941 Points

Can you post the HTML & CSS code for all sections, including the parent.

:)

The div at the bottom wraps to fit into the remaining space. Since the header is taking up 70%, the bottom primary-content fill in the rest of the 30% on that row and then continue to take up the 100% underneath the header.