How to apply a CSS effect to the first 10 <a>
tags of a div?
This is my approach, but I believe there has to be a better solution:
a:nth-child(1), a:nth-child(2), a:nth-child(3), a:nth-child(4),
a:nth-child(5), a:nth-child(6), a:nth-child(7), a:nth-child(8),
a:nth-child(9), a:nth-child(10){ color:#4faacb; }
I believe this CSS should do the trick
a:nth-child(-n+10) { color: #4faacb }
JSFiddle
Hope this helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With