JSFiddle - React, Tailwind, and code Playground
HTML
<div id="parent">
THIS IS THE PARENT
<div id="child">
THIS IS THE CHILD
</div>
</div>
CSS
html, body {
margin: 0;
padding: 0;
}
#parent {
background-color: red;
width: 400px;
height: 600px;
}
#child {
background-color: green;
width: 400px;
height: 100px;
}
JavaScript
$("#child").css({"position" : "absolute", "top" : $("#child").parent().height() - $("#child").height()});