I have a number of elements with specific css class on the page (let's say item
). Is it possible to apply a css style on the (N-1)th .item
? For example it there are 9 elements then I need to style 8th.
I know about :nth-last-child(2)
. But it doesn't work in my case. It searches for CHILD elements but in my case elments are distributed between different parents.