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

Joseph Ledford
Joseph Ledford
5,057 Points

Sass Advanced Nesting Challenge

Every time I try Challenge 4 of Sass, I know I am doing the procedure correctly, yet it still tells me I am wrong. Is there anything that can be done to help?

p{
  a{
    color:red;
   }
   >a{
    color:blue;
      &:hover{
        opacity:0.5;
       }
       .footer &{
        color:purple;
        } 
   }

  }

2 Answers

Hi Joseph,

The challenge wants you to be more specific. It's a div with a class of "footer". Not just any element with a class of "footer".

Yvette Demidova
Yvette Demidova
7,476 Points

This is what worked out for me.

/* Write your SCSS code below. */
p{
  a{
    color: red;
    div.footer & {
      color: purple;
    }
  }
  > a {
    color: blue;
    &:hover {
      opacity: 0.5;
    }
  }
}

Found the answer here: https://teamtreehouse.com/forum/having-trouble-passing-the-last-challenge-question-in-getting-started-with-sass-please-help