CSS Sass Basics Improve Your Workflow with Sass Write Nested Selectors

Tadjiev Codes
Tadjiev Codes
9,615 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,615 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?