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 trialmattlebl
10,849 PointsSass post-selector trouble
In this Sass code challenge, I'm trying to make the a within the p within the .footer purple using the ampersand post selector, but something's not adding up. Help!
/* Write your SCSS code below. */
p {
a {
.footer & {
/* Trouble area right here, */
color: purple;
}
color: red;
}
> a {
color: blue;
&:hover {
opacity: 0.5
}
}
}
1 Answer
Geert-Jan Hendriks
23,126 Points/* Write your SCSS code below. */
p{
a{
color: red;
}
> a{
color: blue;
&:hover{
opacity: 0.5;
}
div.footer & {
color: purple;
}
}
}
mattlebl
10,849 Pointsmattlebl
10,849 PointsWow. Now I feel dumb. :D
Thanks!