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 trialSascha Lamparter
Front End Web Development Techdegree Graduate 15,570 PointsSelector for a list element
Why do I have to select a list element with:
.contact-info li.phone a
and not just with the class that I gave the element:
.phone
?
1 Answer
Nicholas Vogel
12,318 PointsIn the example that you've given, you're actually selecting the .phone a, but either way, there are multiple ways to target an element. This is probably just showing you the exact path that you would be taking in calling .phone a. If you're still in the basic part of the courses, they typically show you how things work, not necessarily best practice right away.