JSFiddle - React, Tailwind, and code Playground
HTML
<div class="container">
<div class="first">
first
</div>
<div class="second">
<div class="second-inner">
second
</div>
</div>
</div>
CSS
.first, .second, .second-inner {
height: 50px;
width: 50px;
}
.first {
background-color: wheat;
}
.second {
display: flex;
flex-direction: column;
justify-content: center;
height: 100%;
}
.second-inner {
background-color: purple;
}
.container {
background-color: silver;
height: 400px;
display: flex;
flex-direction: column;
}