JSFiddle - React, Tailwind, and code Playground
HTML
<div class="parent">
<div class="child"></div>
</div>
CSS
.parent {
position: relative;
overflow: hidden;
height: 100px;
background: #ccc;
}
.child {
position: absolute;
top: 100%; left: 0;
width: 100%; height: 10px;
background: #900;
}
.extra {
position: relative;
height: 0;
}
JavaScript
var $parent = $(".parent"),
$child = $(".child"),
extra_html = '<div class="extra"></div>',
$extra;
$parent.after(extra_html);
$extra = $(".extra");
$child.appendTo($extra);