title: DIV width according to containing IMG width. Inside text overflow
body: <p>I have a <code>DIV</code> element which contains <code>IMG</code> and some one line text under this image. I would like to make this containing <code>DIV</code> the same width as the image width and the overflowing text hidden probably with <code>overflow:hidden</code>.</p>
  
  <p>Is there any way how to do that in <code>HTML</code> and <code>CSS</code> or must I use <code>JavaScript</code> in this case ? (<strong>I don't need JS solution</strong>)</p>
  
  <p><strong>EDIT:</strong> sorry, I should probably mention a few more details. The image's size is unknown because actually there is a lot of those <code>DIV</code> elements on the page with different images and in the description under image there are like 4 differently styled lines. I wrote 'ONE LINE' just because only this one line needs to be set with overflow.</p>