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 trialRobbie Thomas
31,093 PointsCode Challenge: Advanced Selectors #3
I have this:
p { a { color: red; } }
p {
a { color:blue; &:hover { opacity:0.5; } }
It says: Bummer! You need to set 'opacity: 0.5' for the hover pseudoclass.
Also, I noticed that the green box says Running... Is Treehouse having some troubles?
3 Answers
Jason Anello
Courses Plus Student 94,610 PointsHi Robert,
When you added the hover
rule in step 3 you must have forgotten to add a closing curly brace. You only have 2 final closing curly braces and it should be 3
p {
a {
color: red;
}
}
p {
> a {
color:blue;
&:hover {
opacity:0.5;
} /* You forgot one of these 3 final closing curly braces */
}
}
You should be nesting the direct child rule inside your 1st p
rule so that you don't have this duplication.
Like this:
p {
a {
color: red;
}
> a {
color:blue;
&:hover {
opacity:0.5;
}
}
}
Sreng Hong
15,083 PointsI found out that you forget the closing curly bracket, so it should be like this <br /> <br />
p { > a { color:blue*}*; &:hover { opacity:0.5; } }
Robbie Thomas
31,093 PointsBoy, do I feel like such a dummy, thanks.