JSFiddle - React, Tailwind, and code Playground
HTML
<div id="parent">
<div id="child">
Hello
</div>
</div>
CSS
#parent {
margin: 30px;
padding: 30px;
background: red;
height: 200px;
position: relative;
}
#child {
position: absolute;
top: 50%;
transform: translateY(-50%);
background: blue;
height: 70px;
}