calculate height of container with absolutely positioned children
<p>How to calculate the height of a container which has children positioned absolutely? We can assume only direct children are positioned absolutely. Children have the same classes (no IDs) and are rotated, some are positioned using padding, like this:</p>

<pre><code>&lt;div class=my-view style="position: relative";&gt;
&lt;div class=my-child style="position: absolute; top: 5px; left: 10px; -webkit-transform: rotate(13deg);"&gt;
&lt;div class=my-child style="position: absolute; padding-bottom: 5%; padding-left: 10%; -webkit-transform: rotate(-6deg);"&gt;
&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>(for other browsers the transform tag looks different of course)</p>

<p>P.S. If it is necessary, children may have IDs</p>

<p>[Update]
Perhaps something like this code would work, but doesn't, because after the loop oTot.tot is zero ("tot" is like "total"):</p>

<pre><code>  var oTot = { tot: 0 };  
  $(".my-view .my-child").each(function() {
    var h = $(this).outerHeight();
    var y = $(this).position().top + h;
    if (y &gt; oTot.tot) {
      oTot.tot = y;
    }
  });
</code></pre>
