Flexbox vs CSS Grid: Perfectly Centered

Flexbox vs CSS Grid: Perfectly Centered by Wes Bos

HTML

<link rel="stylesheet" href="https://cdn.rawgit.com/wesbos/css-grid/master/assets/style.css">
<div class="hero">
  <h2>Something Big Is Coming</h2>
  <p>Get Ready...</p>
</div>

CSS

.hero {
  height: 200px;
  background: rgba(255, 255, 255, 0.2);
  /* display: grid;
  align-content: center;
  justify-items: center; */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}