I have a div
tag containing several ul
tags.
I'm able to set CSS properties for the first ul
tag only:
div ul:first-child {
background-color: #900;
}
However, my following attempts to set CSS properties for each other ul
tag except the first one don't work:
div ul:not:first-child {
background-color: #900;
}
div ul:not(:first-child) {
background-color: #900;
}
div ul:first-child:after {
background-color: #900;
}
How can I write in CSS: "each element, except the first"?