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 trialKristopher King
4,729 Pointswhat does a descendant selectior consist of?
memorizing all of these terms is confusing, I will get all this during the course, but I'm just trying to pass this quiz. Can someone help me?
2 Answers
Steven Parker
231,248 PointsA descendant selector is basically two (or more) combined selectors separated by a space. On the left is the selector(s) for the containing element(s), and on the right is the selector for the actual target. Examples:
header a { /* to select all the links (a) inside the header */ }
.col div p { /* paragraphs inside a div that is inside a container with class "col" */ }
gertjanlaureys2
843 PointsIt consists of AT LEAST 2 selectors that are combined, seperated by a space. for example a paragraph in a header:
header p {
color: red;
}
Result: ONLY the paragraphs in the header will have the red font color.