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 trialSteve Suresh
13,185 PointsStuck on advanced nesting challenge.
I'm stuck on Challenge Task 3:
On hover, I'm trying to give an opacity of .5 to all direct children of "a" tag by using nested selector with ampersand. The challenge says to add to previous code but maybe I'm not understanding the question correctly.
I've been stumped for a couple of hours :(
p {
> a {
color: blue;
&:hover {opacity: .5;}
}
}
4 Answers
Jason Anello
Courses Plus Student 94,610 PointsHi Steve,
It looks like it needs to be 0.5 and not .5
All your nesting looks good.
Steve Suresh
13,185 PointsThanks. I'm new to posting code to the forum.
Stone Preston
42,016 Pointsno problem, you might also want to have a look at this post for some other code formatting options
Steve Suresh
13,185 PointsCorrect answer on Challenge Task 2:
p {
> a {
color: blue;
}
I'm stuck on Challenge Task 3:
On hover, I'm trying to give an opacity of .5 to all direct children of "a" tag by using nested selector with ampersand. The challenge says to add to previous code but maybe I'm not understanding the question correctly.
I've been stumped for a couple of hours :(
p {
> a {
color: blue;
&:hover {opacity: .5;}
}
}
Steve Suresh
13,185 PointsThanks for the help Jason. It's much appreciated :)
Stone Preston
42,016 PointsStone Preston
42,016 Pointsive formatted your code for you. you need to use backticks ( ` ) to make code fences which are below the esc key on most keyboards, not apostrophes ( ' )