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

Steve Suresh
Steve Suresh
13,185 Points

Stuck on advanced nesting challenge.

I'm stuck on Challenge Task 3:

On hover, I'm trying to give an opacity of .5 to all direct children of "a" tag by using nested selector with ampersand. The challenge says to add to previous code but maybe I'm not understanding the question correctly.

I've been stumped for a couple of hours :(

p {
> a {
  color: blue;
 &:hover {opacity: .5;}
  }
}
Stone Preston
Stone Preston
42,016 Points

ive formatted your code for you. you need to use backticks ( ` ) to make code fences which are below the esc key on most keyboards, not apostrophes ( ' )

4 Answers

Hi Steve,

It looks like it needs to be 0.5 and not .5

All your nesting looks good.

Steve Suresh
Steve Suresh
13,185 Points

Thanks. I'm new to posting code to the forum.

Stone Preston
Stone Preston
42,016 Points

no problem, you might also want to have a look at this post for some other code formatting options

Steve Suresh
Steve Suresh
13,185 Points

Correct answer on Challenge Task 2:

p {
> a {
  color: blue;
}

I'm stuck on Challenge Task 3:

On hover, I'm trying to give an opacity of .5 to all direct children of "a" tag by using nested selector with ampersand. The challenge says to add to previous code but maybe I'm not understanding the question correctly.

I've been stumped for a couple of hours :(

p {
> a {
  color: blue;
 &:hover {opacity: .5;}
  }
}
Steve Suresh
Steve Suresh
13,185 Points

Thanks for the help Jason. It's much appreciated :)