Home › Forums › CSS › First- and last-of-type pseudo selectors. › Reply To: First- and last-of-type pseudo selectors.
July 27, 2017 at 3:55 am
#257118
Member
Use the other selectors available to you. >
, ~
& +
etc.
This div.example p:last-of-type
is different from div.example > p:last-of-type
for instance.
Or just add additional classes as needed
But in general, I’d avoid them nth
unless you really can’t do it any other way.