.green { background-color : lime ! important } p:not(:nth-last-of-type(3)) { background-color : red } dl > *:not(:nth-last-of-type(3n+1)) { background-color : red }