How to skip first child?

css, css-selectors

Solution

With the negation pseudo-class:

p:not(:first-child) { color: red; }

Browser support is very strong now, but alternatives include:

p { color: red; }
p:first-child { color: black; }

and:

* + p { color: red; }

Problem

``` <div id="main"> <p> one </p> <p> two </p> <p> three </p> <p> four </p> <p> five </p> <div> ``` I don't want to apply css on first `<p>One</p>` ``` p {color:red} ``` I need just opposite of `:first-child`.

Original source