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 trialjoans victor da rocha cruz
Front End Web Development Techdegree Student 216 Pointshello i see that in the CSS there is "ul.skills" and than ".skills"
i think i know what it means but could i hava an explanation ?
1 Answer
Tyler Duke
4,344 PointsHey Joans,
ul
is the parent of skills
.
To access the skills
class in CSS, we are accessing it through its parent (ul
).
In other words, often you may have classes with the same name but under different parents. To be more specific in your selectors, and to accurately select the element you want to style, you want to select its parent element (in this case, ul
).
Another way to view this is like a cookie jar. You want to retrieve a cookie
but the cookie is in the cookie jar
. In order to get your cookie, you need to open the cookie jar and get the cookie that's inside. In this case, our .cookie--jar
class contains our .cookie
class. Or, in this case, the ul
element contains the .skills
class.
Regards
P.S. Always make sure your classes have a period in front of them, and your IDs should have a hashtag (#
- a much more unique identifier) in front of them.