Nth-of-type Trying to highlight 2

I’m trying to highlight those 2 end boxes.

I was only able to get the first box, but not the 2nd box.
https://jsfiddle.net/yhb9m76s/52/

What would be the right combination?

.wrape .nav li:nth-of-type(9n) a {
  background: red;
}

li:nth-of-type(5n+9)

Every 5th child, offsetting by 9.
Will work if you don’t plan to add more icons :slight_smile:

1 Like

If it’s always the last you can also use last-of-type

.wrape .nav li:nth-of-type(9n) a,
.wrape .nav li:last-of-type a {
  background: red;
}