Of all the CSS3 selectors the structural pseudo-classes have to be my favourite. In particular I love :last-child selector, the :last-child CSS selector is incredibly powerful especially when positioning elements in a row, I am currently finding it incredibly useful when doing menus. Instead of providing a last class on the very last element in the row, you can now use pure CSS to achieve the same effect.
Unfortunately the bad aspect of this selector is that it does not fail gracefully. Meaning that a user in a none CSS3 compliant browser, (IE), it would fail horribly, this means that everything will be out of line.
If you look at this in anything but a browser which supports CSS3 the last element won't be red.
- W3C Selectors Level 3
- CSS3 Compatibility Table
- MSDN Compatibility Table (tells you what works in IE8)
- Take Your Design To The Next Level With CSS3