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!
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
Chris Stauffer
Courses Plus Student 786 PointsChallenge task 4 of 4 in Advanced Nesting
On challenge 4 of 4 it asks you to "add an exception for a tags that are are in the div with a class of '.footer': those links should be purple. Use the post-selector ampersand to achieve this."
I'm clueless. I'm not sure how to do this without just adding:
.footer a { color: purple; }
My code for the first 3 challenges:
p {
a {
color: red;
}
> a {
color: blue;
&:hover {
opacity: 0.5;
}
}
}
2 Answers

Tom Bedford
15,645 PointsHi Chris, take a look at this thread.

Adam Sackfield
Pro Student 19,663 PointsI would watch the video again but im sure its something like
div.footer a & { color: purple; }

Chris Stauffer
Courses Plus Student 786 PointsI did watch the video again! I will see if this is accepted and try to wrap my head around it, thanks man.

Adam Sackfield
Pro Student 19,663 PointsChris Stauffer let me know if it works

Chris Stauffer
Courses Plus Student 786 PointsDidn't work, the validator was looking for something like this:
p {
a {
color: red;
div.footer & {
color: purple
}
}
}
Chris Stauffer
Courses Plus Student 786 PointsChris Stauffer
Courses Plus Student 786 PointsI searched the forum for "Advanced Nesting" woth no luck, whoops. Thanks for the link.
Tom Bedford
15,645 PointsTom Bedford
15,645 PointsThings to tend to get buried here rather quickly, I wonder if Treehouse could devise a way to link threads to a certain video/challenge.
Adam Sackfield
Pro Student 19,663 PointsAdam Sackfield
Courses Plus Student 19,663 PointsEasiest way to search is to Google the question with team treehouse in the search too.