JSFiddle - React, Tailwind, and code Playground
HTML
<div class="parent" style="height:180px">
<div class="child">
<header>title</header>
<div>test11</div>
<button>
Test
</button>
<button>
Cancel
</button>
</div>
</div>
CSS
* {
box-sizing: border-box;
}
.parent {
max-height: 300px;
margin: 0 auto;
background-color: #fff;
position: fixed;
top: 20%;
left: 20%;
border: 1px solid #000;
width: 234px;
}
.child {
padding: 40px 54px 54px;
display:flex;
height:100%;
align-items:center;
justify-content:center
}