JSFiddle - React, Tailwind, and code Playground
by camel2243
HTML
<div id="div1">
<div id="div2">
</div>
</div>
CSS
#div1 {
background-color: #0F0;
position: relative;
width: 100px;
height: 150px;
}
#div2
{
position: absolute;
top: 50%;
background-color: #F00;
width: 100px;
height: 40px;
margin-top: -20px;
}