title: How to make a div expand vertically to wrap the content within it?
body: <p>I have a div which wraps a number of images that are generated dynamically. I don't know how high the list of images is. My problem is the div that contains the dynamically generated images doesn't behave like it is housing any content - I want it to extend to the height of the list of images. Each image is itself wrapped in a div.</p>
  
  <p>This is the wrapper div:</p>
  
  <pre><code>.block { padding:10px; margin-top:10px; height:auto; background-color:#f9f9f9; }
  </code></pre>
  
  <p>This is the markup dynamically generated for (one of) the images:</p>
  
  <pre><code>&lt;div class="block"&gt;
  &lt;div style="float: left; padding: 2px 2px 2px 2px;"&gt;&lt;IMG SRC="45.jpg" BORDER="0"/&gt;&lt;/div&gt;
  .....
  </code></pre>
  
  <p>How do I get the <code>block</code> div to extend down with the images?</p>
  
  <p>Thanks</p>