Center and crop thumbnails with CSS - Jonathan Nicol

Here is a handy CSS centering technique I first noticed in the WordPress media library, where it is used to centre and crop irregularly sized thumbnails within a square container.
http://jonathannicol.com/blog/2014/06/16/centre-crop-thumbnails-with-css/