@dinakonto
Posted
Hi Onur,
Nice work!
Combining the :not()
and :first-of-type
pseudo-classes should do the trick. For example:
.rate-box:not(:first-of-type)
should target every .rate-box EXCEPT the first one.
Happy coding :)
Looking to hire developers?
Is there an another way to apply a margin value that does work no matter how many rate boxes are inserted. I selected the second and third rate box to apply a margin-left value (see below) to have this "stair" effect.
.rate-box:nth-child(2) { margin-left: 40px; } .rate-box:nth-child(3) { margin-left: 80px; }
thanks in advance.
@dinakonto
Posted
Hi Onur,
Nice work!
Combining the :not()
and :first-of-type
pseudo-classes should do the trick. For example:
.rate-box:not(:first-of-type)
should target every .rate-box EXCEPT the first one.
Happy coding :)
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord