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 Improve Your Workflow with Sass Write Nested Selectors

Junior Suarez Peralta
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Junior Suarez Peralta
Front End Web Development Techdegree Graduate 15,160 Points

Next, use the & symbol to create the selector .icn-success. Set the color of .icn-success to green.

Hey can someone help me, I dont know what I'm doing wrong if it's the correct code.

style.scss
.banner {
  padding: 1em;
  background-color: lightgrey;
.button{
font-size: 1.5em;
}
.icn{
font-size: 1.25em;
}

 &-success {
     color: green;
   }
}

3 Answers

Steven Parker
Steven Parker
231,198 Points

Looks like the nesting got messed up after task 2.
The .icn rule created in that step should be at root level and not inside the other rule.

Steven Parker
Steven Parker
231,198 Points

Not sure what you mean by "aoude" ... did you mean before? That should fix task 1.

Then for task 2, the &-success rule does need to be inside the .icn rule.

Steven Parker
Steven Parker
231,198 Points

You must have gotten it right the first time to move on to task 2.

Steven Parker
Steven Parker
231,198 Points

All of your original issues are just nesting. If you fix that, you'll pass.

If you still have trouble, show the code you have now.

Junior Suarez Peralta
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Junior Suarez Peralta
Front End Web Development Techdegree Graduate 15,160 Points

.banner { .icn{ font-size: 1.25em; }

&-success{ color: green; }

padding: 1em; background-color: lightgrey; .button{ font-size: 1.5em; } }

I'm trying to do it like this but it still does not work it still says i need to put the correct value

Steven Parker
Steven Parker
231,198 Points

The value isn't the issue, but it won't be correctly applied while things are out of order.

You've gotten off track, the original code is closer. I'd suggest starting over and being very careful about nesting (what goes inside of what).