JSFiddle - React, Tailwind, and code Playground
by khalifah
HTML
<div class="container">
<div class="absolute">
Testing absolute<br />
Even more testing absolute<br />
</div>
A little test<br />
</div>
CSS
.container {
background: green;
}
.absolute {
position: absolute;
background: red;
}
JavaScript
$( document ).ready(function() {
$( ".container" ).each(function() {
var newHeight = 0, $this = $( this );
$.each( $this.children(), function() {
newHeight += $( this ).height();
});
$this.height( newHeight );
});
});