Selecting the last child list element used to require a special last class attached to that element. Those days are no more with the very useful last child selector.
The MDC page for the
:last-child selector explains it the best.
The :last-child pseudo-class matches any element that is the last child element of its parent.
This can be useful in all sorts of ways. For instance, if you had a bunch of floated elements, you could easily clear the last one so that the page doesn’t go out of crazy. If you had a list and needed to adjust the padding on the last element so that it fits better, you can do that too. You can checkout my example as a jsfiddle too.
However, it should come as no surprise that older browsers don’t support this. No Internet Explorer supports this and other younger browsers like Firefox 2 or Safari 3 may not support it either.