<div class="holder">
    <div class="content">
        I will be vertically aligned. Hooray!
    display: flex;
    flex-direction: column;

    /* This centers content vertically */
    justify-content: center;

    /* This centers content horizontally, think 'text-align:center' */
    align-items: center;
  /* Just giving this div a height and a background color as an example */
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.