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 Basics Getting Started with CSS Layout Creating a Layout Wrapper

Robert Homan
seal-mask
.a{fill-rule:evenodd;}techdegree
Robert Homan
Front End Web Development Techdegree Student 9,437 Points

ID 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?

Chris Conwell
Chris Conwell
2,268 Points

IDs must be unique. You can't have more than one element with the same ID in an HTML document.

1 Answer

Timo J.
PLUS
Timo J.
Courses Plus Student 20,919 Points

It'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.