<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 firstchild
.
<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 firstchild
.
In theory, with :not.
p:not(:first-child) { color: red; }
Browser support is weak though, so you are probably better off with:
p { color: red; }
p:first-child { color: black; }