title: How to resize an image in pure HTML/CSS while keeping its proportions?
body: <p>How can I resize an image using HTML/CSS only (i.e no server code) while keeping its proportions and have a crop effect.
  Details: I wish to resize it to a specified width, keep the proportions and if the height is bigger than a specified value to crop it to the specified height ?</p>
  
  <p>Actually, I know how to do that using some server code but I don't want to do this. It would imply using a different file reference and refer the picture something like <code>&lt;img src="picture.php" /&gt;</code>. I need to process the image in the same page that displays it.</p>
  
  <p>What "bothers" me is that I have to send the image header so nothing else on the page will be displayed.</p>
  
  <p>Is there a way to do something like that? Maybe from pure HTML/CSS? :P</p>
  
  <p>I made a function that does something like that (except that "crop" thing) and it returns just <code>width="" height=""</code> and I use it like this <code>&lt;img src="image.jpg" resize("image.jpg") /&gt;</code>, but I don't get how can i do that crop...</p>
  
  <p>Thanks</p>