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 trialRobert Homan
Front End Web Development Techdegree Student 9,437 PointsID vs. Class for the wrapper?
Why was wrapper made into a class instead of a ID? Aren't ids more specific? Wouldn't you want to use an id to wrap the main elements instead as to have more control over your layout?
1 Answer
Timo J.
Courses Plus Student 20,919 PointsIt's only a matter of taste. You can do both on your personal projects. In a company and with a team you will need to follow a kind of chart to be understandable by your colleagues so my advice is to be confortable with both.
Chris Conwell
2,268 PointsChris Conwell
2,268 PointsIDs must be unique. You can't have more than one element with the same ID in an HTML document.