<div class="grid-centering"><div class="child">Centered content.</div></div>
.grid-centering {
  background: aliceblue;
  display: grid;
  justify-content: center;
  align-items: center;
  height: 100px;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.