<div class = "parent">
<div class = "child"></div>
</div>
.parent {
width:500px;
height:500px;
border:3px solid #000;
display:flex;
justify-content:center;
align-items:center;
}
.child {
width:200px;
height:200px;
background-color: green;
}