first-child, last-child and nth-child are made exactly for this purpose.

It just looks better and keeps my HTML markup clean. Very often I need to select a specific DOM element. CSS: Understanding first-child, last-child and nth-child / I like the CSS only solutions. Sure I could add a new class, but it is always nice if I can do that inside my stylesheets.