css not:first-child selector

Posted by OTARIKI on Stack Overflow See other posts from Stack Overflow or by OTARIKI
Published on 2012-09-05T21:09:16Z Indexed on 2012/09/05 21:38 UTC
Read the original article Hit count: 184

Filed under:
|

I have div tag and him is several ul tags.

If I trying set css properties only for first ul tag, this code works:

div ul:first-child {
    background-color: #900;
}

But when i want set css properties each ul tags, except first, I trying this:

div ul:not:first-child {
    background-color: #900;
}

also this

div ul:not(:first-child) {
    background-color: #900;
}

and this

div ul:first-child:after {
    background-color: #900;
}

But effect none. Someone tell please, how must write in css: "each element, except first" ?

© Stack Overflow or respective owner

Related posts about html

Related posts about css