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 trial

CSS Sass Basics (retired) Getting Started with Sass Advanced Nesting

Eric Bell
Eric Bell
6,908 Points

Cannot figure this challenge out

Heres what i've written so far: '''html

p { a { color: red; }

    > a {
color: blue;

    &:hover {
      opacity: 0.5;
}

    .footer & {
      color: purple;
}

} }'''

It's task 4 of 4, I need to change the color of the <a> tags in the .footer <div> using the ampersand selector. From what I understand so far, what I'm using should work? But I'm obviously doing something wrong. Any help is greatly appreciated, been stuck for a while.

Eric Bell
Eric Bell
6,908 Points

sorry, I'm new to the whole markup thing in the comments, I can't get it to look quite perfect but that is the meat of the problem, the .footer selector

2 Answers

I think this is a duplicate of this.

Eric Bell
Eric Bell
6,908 Points

Didn't even see that one. Thank you!