:nth-last-of-type()
This is used to style the nth last child by type of its parent element. The child number goes in the brackets.