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 trialRoni Lubwama
3,456 Pointshow do you give both <div> elements class attributes?
how do you give both <div> elements class attributes?
2 Answers
Ken Alger
Treehouse TeacherRoni;
You include the class name, in this case "favorite_stuff" in both <div> elements.
<div class="favorite_stuff">
<!-- First div content -->
</div>
<div class="favorite_stuff">
<!-- Second div content -->
</div>
Remember that you can use the same class values repeatedly on a page. id
values must be unique on each page.
Post back with further questions.
Happy coding,
Ken
jason chan
31,009 PointsSo it can have the same style rule. You'll see soon.
Roni Lubwama
3,456 PointsThanks Jason. Truly appreciate.
Roni Lubwama
3,456 PointsRoni Lubwama
3,456 PointsThanks Ken. Truly appreciate.