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

Isn't the div nested in the wrapper?

I'm not trying to pick apart Nick's videos, but I am still trying to master how floats work on the web page. In the video on floats within the Page Layout course from the CSS Foundations section, Nick says "Because the floated element isn't nested inside of the wrapper in the HTML, it will be contained to the wrapper." (This is in the transcript at the 3:25 mark.) However, when I look at the HTML from the project file, the "myDiv1" (the aforementioned floated element) seems to be nested within the wrapper div.

In fact, it being nested inside of the wrapper IS what keeps it contained to the wrapper isn't it?

It could be that I don't understand this enough to know what I am talking about, but I would appreciate any feedback to determine if this is a mistake in the video or something that I need better understanding of. Thanks.

3 Answers

Nick Pettit
STAFF
Nick Pettit
Treehouse Teacher

Hi Ryne Smith,

Sorry for the slow reply. That's actually a mistake in the captions, which I've just changed. In the video at 3:25 I'm saying "Because the floated element is nested inside of the wrapper in the HTML" - That's a big difference!

Sorry for the confusion. Does that answer your question? :)

Thanks Nick!

That did answer my question. I wasn't trying to be picky. I was just making sure I was straight on how the nested divs work.

By the way, you guys are doing a wonderful job with treehouse. Through the training I am receiving, I have finally begun a dream project of mine that will help many other people. It will benefit mostly middle school and high school students and you guys are helping to make it possible.

Nick Pettit
STAFF
Nick Pettit
Treehouse Teacher

That's awesome news to hear! Glad you're able to achieve your dreams, as that's part of our mission. :)