title: Div height defined by image with absolute positioning?
body: <p>I have an absolutely positioned image within a div and I would like the height of that div to be defined by the image. However, I can't figure out how to do that with absolute positioning enabled on the image. Eventually I will be using multiple absolutely positioned images in this div which is why I am going this route. Any ideas?</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div class="image"&gt;
      &lt;img class="image1" src="image1.jpg" /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>CSS:</p>
  
  <pre><code>.image {
    position:relative;
  }
  .image1 {
    width:100%;
    position:absolute;
  }
  </code></pre>
  
  <p>Thanks!</p>