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 How to Make a Website Styling Web Pages and Navigation Polish the Navigation and Footer

scott baldwin
scott baldwin
807 Points

Class vs ID

Why was a class used rather than an ID to re size the social media icons. Is there a benefit?

1 Answer

B B
B B
2,934 Points

Haven't done the lesson you are referring to, but since you said "social media icons" as in plural its probably best to use a class since you are affecting/resizing a group of objects. ID would be good if you wanted to reference one specific item because each item can only have a unique ID, so if you have 3 social media icons you would end up having to write the same CSS for three separate items instead of just writing it all in one class.

scott baldwin
scott baldwin
807 Points

Thanks! That cleared up things.