title: How to resize a div container to fit overflow from a child div
body: <p>I have a div container with a child div inside:</p>
  
  <pre><code>&lt;div id=mainWrapper&gt;
      &lt;div id=child&gt;
      &lt;/div&gt;
  &lt;div&gt;
  
   #mainwrapper height:100%, width:900px
   #child height:100%, width:50% overflow:visible float:right
  </code></pre>
  
  <p>The child div contains a list of elements.</p>
  
  <p>How to I resize the mainWrapper when the overflow from the child is larger than the height of the mainWrapper?</p>
  
  <p>I've tried a bunch of css and also some script:  $('#mainWrapper').css('height',$('#child').height());</p>
  
  <p>nothing is working.</p>