<div class="container">
<span class="text">
I'm one line of text!<br/>
I'm another line of text!
</span>
</div>
html {
padding: 20px;
}
.container {
display: table;
width: 100%;
height: 80px;
background: #eee;
}
.container > .text {
display: table-cell;
vertical-align: middle;
text-align: center;
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.