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 trialZimri Leijen
11,835 PointsIsn't a wrapper div a little redundant, you already have the body tag for that.
see title.
2 Answers
Shahetul Chisty
Front End Web Development Techdegree Graduate 21,590 PointsI’ve found a wrapper useful when I want to target everything except for the nav. Such as creating space on each side of the content, but having the nav stretched across.
Samantha Atkinson
Front End Web Development Techdegree Graduate 40,307 PointsThe cool thing about wrappers is that you can give your body selector a background that will cover the entire browser, no matter the size. Then with the wrapper, you could have a totally different background, like an image going on for your content and nicely center your content in the center of a browser no matter the width of the browser/viewport. A wrapper doesn't have to just wrap all content, it can be a wrapper for certain elements too.
alvin wong
12,066 Pointsalvin wong
12,066 PointsThe body tag hold most of the content of the site it just a way to see where the site contents start and having multiple body tag is confusing.