title: Dynamically change height of "div", based on content with preset "width" and "height"
body: <p>I have a "div" with preset "width" and "height". I need to change the height of that "div" based on content. I was looking for some JavaScript but couldn't find appropriate for me.</p>
  
  <p>Here is my simple example, which needs an improvement <a href="http://jsfiddle.net/dmitry313/1zr6Lhwa/" rel="nofollow">http://jsfiddle.net/dmitry313/1zr6Lhwa/</a></p>
  
  <p><b>HTML</b></p>
  
  <pre><code>&lt;div id="content"&gt;
  &lt;h2&gt;Text&lt;/h2&gt;
  &lt;p&gt;Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example &lt;/p&gt; 
  &lt;/div&gt; 
  </code></pre>
  
  <p><b>CSS</b></p>
  
  <pre><code>    h2 {
  font:18px/30px Arial;
  }   
  #content {
  width:200px;
  height:100px;
  border:1px solid #000;
  background: yellow;
  }
  </code></pre>
  
  <p><b>EDIT:</b> Initially preset "width" and "height" are important and can't be changed </p>