24 ways to impress your friends

Jump to menu

Vote up?

Erik Vorhes

A caveat: Internet Explorer 8 chokes on any CSS that includes a selector it doesn’t recognize, so it doesn’t respect this line of CSS from the “nth-child last-child” example:

ul.gallery li:nth-child(3n), ul.gallery li.last { margin-right: 0; }

To get IE8 to play nicely, you’ll need to change it to this:

ul.gallery li:nth-child(3n) { margin-right: 0; }
ul.gallery li.last { margin-right: 0; }