Lego2012
9/26/2016 - 9:46 PM

Align Content vertically using Flexbox

Align Content vertically using Flexbox

.container{
  display: flex;
  align-items: center;
  height: 10em;
  background: #7396a1;
  width: 300px;
  color: #fff;
  margin-left: auto;
  margin-right: auto;
}
<div class="container">
  <div class="content">I'm aligned vertically!</div>
</div>