CSS Advanced Sass Advanced Directives Iterable Album

help me here please guysessss

Here we have a series of ad banners, of increasing width. Can you add additional banners for "treehouse" and "google"?

@mixin ad-banner($cols) {
  $col-val: length($cols);

  @for $i from 1 through $col-val {
    .ad-banner-#{nth($cols, $i)} {
      width: percentage((1 / $col-val) * $i);

@include ad-banner(apple microsoft);

1 Answer

Samantha Atkinson
Samantha Atkinson
Front End Web Development Techdegree Student 26,027 Points

Hi sorry for the late reply Mokanye Tumelo Tricia. Did you get it to work? When you call the mixin that would be where you want to add Treehouse and Google, as basically those are the ad-banners you want to create. As in the mixin you are using the length function which means the for loop loops through the length/number of items included in the argument.