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

Wha is the difference between .wrap and .wrap div?

Ok am going through 3d transforms with Guil and in the css he has a rule .wrap then the next rule he writes, .wrap div ok im a bit confused, wrap is already declared as a div in the html, why/what is the ?distinction

1 Answer

Ingrid,

.wrap deals with the div class named wrap while .wrap div deals with all the divs that are children of the div class wrap.

<div class="wrap">
     <div class="col1"></div>
     <div class="col2"></div>
     <div class="col3"></div>
</div>

.wrap with handle the first div in the example above while .wrap div will handle all the divs (col1 - col3) inside of the wrap div. Hope this helps.

Cheers!

yes it most certainly does, thanx a million!