title: Making a div the same size as an image inside it
body: <p>I have an div with the following code</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div id='imgContainer'&gt;
      &lt;img src='/img/logo.png' id='imglogo'&gt;&lt;/img&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>CSS</p>
  
  <pre><code>div#imgContainer {
      width: 250px;
      height: 250px;
      padding: 13px;
  }
  </code></pre>
  
  <p>The problem is the users can edit the image size, colour and some other things, so I want the div to get bigger as the image get bigger. I want the width and height of the div to be 250px if the image is smaller than it, but to get bigger as the image gets bigger. </p>
  
  <p>The solution can be in PHP, JavaScript, CSS or jQuery.</p>