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 trialMatthew Schmookler
8,970 PointsChallenge says to add an exception to the <a> of the <div> class .footer using an ampersand. My code isn't working
I've tried several combinations and I haven't been able to compete the challenge. This is my last attempt. I also nested the .footer inside of the original <a> tag and used various other configurations....nothing worked :(
/* Write your SCSS code below. */
p { a{ color: red; }
}
a { color: blue; &:hover { opacity: 0.5; } .footer &{ color: purple; }
}
}
3 Answers
Clinton Hopgood
7,825 Pointsp {
a {
color: red;
}
> a {
color: blue;
&:hover {
opacity: 0.5;
}
div.footer & {
color: purple;
}
}
}
Maciej Czuchnowski
36,441 PointsThis should work, I think you're missing the div selector:
/* Write your SCSS code below. */
p {
a {
color: red;
}
> a {
color: blue;
&:hover {
opacity: 0.5;
}
div.footer & {
color:purple;
}
}
}
Matthew Schmookler
8,970 Pointsah thanks, for some reason I didn't think I needed the div selector....ooopsy :) thanks!