title: Fit width of div tightly to multi-line span
body: <p>I want to have a <code>div</code> with a given <code>max-width</code> that tightly fits its width to its child's <code>span</code>. Everything works fine as long as the <code>span</code> is only one line, but as soon as the line break happens the parent <code>div</code> will have the maximum width.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.content {
    margin: 10px;
    max-width: 150px;
    border: 1px dotted black;
    display: inline-block;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="content"&gt;
    &lt;span&gt;1 line works&lt;/span&gt;
  &lt;/div&gt;
  &lt;br&gt;
  &lt;div class="content"&gt;
    &lt;span&gt;2 lines dont workworkwork&lt;/span&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>The first div has a tight fit, the second div however is set at the maximum width - but it could be tighter and I want it tighter. See also my pen at <a href="http://codepen.io/sheinzle/pen/gpVjbG" rel="noreferrer">http://codepen.io/sheinzle/pen/gpVjbG</a></p>
  
  <p>Is getting a tighter fit even possible in HTML? </p>