The :nth-last-of-type(n) selector matches every element that is the nth child, of a particular type, of its parent, counting from the last child.

:nth-last-of-type(number) {
    css declarations;
}
p:nth-last-of-type(2) {
   color: #3366ff;
   background: #ffff99;
}

Click the button below to experiment with this selector.

Give it a Try!

3.5Firefox 9.0Explorer 4.0Chrome 3.2Safari 9,6Opera