title: Resizing and cropping images with CSS
body: <p>I have a site that has a bunch of different images to display, all of different resolutions and aspect ratios. Is there an easy way in CSS to resize and crop images to a certain resolution? For my purposes, I want the resized image to be 280x280. </p>
  
  <p>Of course I can just set <code>&lt;img height = '280' width = '280' /&gt;</code> but this will stretch it. I'd like it to the smaller of the two resolutions, make a square, and then take the center pixels. For example, if the resolution is 480x200 I want it to take a 200x200 section out of the center of the image.</p>
  
  <p>I've tried Googling, but to no avail.</p>