<div class="flex-center">
  <p>I'm vertically centered multiple lines of text in a flexbox container.</p>
</div>
body {
  background: #0ebeff;
  font-size: 80%;
}

div {
    background: white;
    width: 240px;
    margin: 10px auto;
}

.flex-center {
	algin-items: center;
    background: #666666;
    color: white;
    border: 10px solid white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 200px;
    resize: vertical;
    overflow: auto;
}
.flex-center p {
  margin: 0;
  padding: 20px;
}
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.