title: Contain an image within a div?
body: <p>I want to contain an image into a 250 x 250 div, forcing the image to resize but not stretch. How can I do this? By the way, the image will usually be bigger than the div itself, which is why resizing comes into the picture.</p>
  
  <pre><code>&lt;div id = "container"&gt;
    &lt;img src = "whatever" /&gt;
  &lt;/div&gt;
  
  #container { width:250px; height:250px; border:1px solid #000; }
  </code></pre>
  
  <p>Here's a jsfiddle which someone can edit:</p>
  
  <p><a href="http://jsfiddle.net/rV77g/">http://jsfiddle.net/rV77g/</a></p>