<div class="parent">
 <div class="child">
  center me!
 </div>
 <div>2</div>
</>
.parent {
 height: 100vh;
 width: 100vw;
 
 display: grid;
 place-content: center;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.