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
josefina terrera
16,506 PointsTask 2 - Nesting
Add another nested selector which makes all a tags that are direct children of p tags blue.
I'm struggling with task 2. This is what I came up with. What am I doing wrong?
p {
> a {
color: blue;
}
a {
color: red;
}
}
Thanks!
3 Answers
Adam Sackfield
Courses Plus Student 19,663 PointsYou don't want to mess with the code from task one so
???? // Task One Code Here
p > a { color: blue; } // Task Two Code
Purvi Agrawal
7,960 PointsWhat Adam has mentioned is correct. By writing p>a, it means all anchor elements under p. You need not to mention it over again.
Purvi Agrawal
7,960 PointsWhat Adam has mentioned is correct. By writing p>a, it means all anchor elements under p. You need not to mention it over again.