<div class="grid"> <h1>centred</h1> </div>
.grid { display: grid; place-content: center; min-height: 100vh; }
This Pen is owned by Ollie Williams on CodePen.
See more by @cssgrid on CodePen
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.