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 trialCamila Paschini
9,580 Pointssass: it wont accept answer. it hates me.
I dont know how to correct this. Im supposed to make an exception for <a> tags using post-selector &... the links in the .footer should be purple. the preview shows I'm right, but it wont accept my answer :/
here's my code for step 4:
/* Write your SCSS code below. */
p {
a { color: red;
.footer & { color: purple; }
}
> a { color: blue;
&:hover { opacity: 0.5;
}
}
}
halp?
6 Answers
Casey Morris
8,003 PointsYou are targeting everything with the class of "footer". You want to only target divs with the needed class.
Camila Paschini
9,580 Pointsomg it worked :) you were right! the key here was the "all" keyword on the other steps... I changed it to div.footer and it passed :)
Casey Morris
8,003 PointsGlad I could help.
Brandon Leichty
Full Stack JavaScript Techdegree Graduate 35,193 PointsOMG thanks so much for posting this question and answer. I've enjoyed every quiz/code challenge on Treehouse thus far. Except this one. Wanted to rip out my hair! haha
Samuel Webb
25,370 PointsIt was taking me forever to figure this out and just putting that div before .footer worked. that was annoying.
Molly Dopheide
11,083 PointsSame here, thanks for the help!
Michael Whalen
6,908 PointsCould I please see how that is written out? This syntax is confusing me.
Samuel Webb
25,370 PointsJust went back and tested it out to make sure.
p {
a {
color: red;
div.footer & {
color: purple;
}
}
> a {
color: blue;
&:hover {
opacity: 0.5;
}
}
}
Casey Morris
8,003 PointsTo target divs with the class of footer you would write it like this.
div.footer {
/* styles here */
}
Samuel Webb
25,370 PointsI was having some trouble with posting this for a second.