Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS First- and last-of-type pseudo selectors. Reply To: First- and last-of-type pseudo selectors.

#257118
Paulie_D
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.