Simply I'd like to target one rule if there are 3 divs and another if there are 4 divs.
Markup
//one set of rules
<div></div>
<div></div>
<div></div>
//second fules
<div></div>
<div></div>
<div></div>
<div></div>
CSS
/* three items */
div:nth-child(1):nth-last-child(3),
div:nth-child(2):nth-last-child(2),
div:nth-child(3):nth-last-child(1)
/* fouritems */
div:nth-child(1):nth-last-child(4),
div:nth-child(2):nth-last-child(3),
div:nth-child(3):nth-last-child(2),
div:nth-child(4):nth-last-child(1)
I've followed this: http://lea.verou.me/2011/01/styling-children-based-on-their-number-with-css3/ but not with much luck sadly.