Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS Sass Basics Improve Your Workflow with Sass Write Nested Selectors

Tadjiev Codes
Tadjiev Codes
9,623 Points

Below the .banner rule (at the root level), create a new rule that targets .icn and set a font-size of 1.25em.

Hi, I tried to nest it inside the .banner but it doesn't work ((( Can someone help?

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

1 Answer

you are nesting .icn class inside .banner class , instead of putting it below .banner

.banner {
  padding: 1em;
  background-color: lightgrey;

.button {
   font-size: 1.5em;
 }
}
 .icn {
    font-size: 1.25em;
}
Tadjiev Codes
Tadjiev Codes
9,623 Points

Thanks a lot)))) Next, use the & symbol to create the selector .icn-success. Set the color of .icn-success to green. I'm really confused about this nesting selectors questions??? Could you help me with this as well?