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

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
240,995 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.

I tried makin it a root level by putting a closing tag aoude the .icn but is does not work

Steven Parker
Steven Parker
240,995 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.

hey steve, from what i could see i think i did evey task correctly. I tried to do what you told me making a root of .icn but that does not work either.

Steven Parker
Steven Parker
240,995 Points

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

yes but my problem is task 3 it's saying i need to put the right color value and I have the right one but it still give me a wrong answer

Steven Parker
Steven Parker
240,995 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.

.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
240,995 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).