Home > CSS > Align text vertically center in div

<div><span>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</span></div>

div {
width: 200px;
height: 100px;
line-height: 100px;
text-align: center;
}

span {
display: inline-block;
vertical-align: middle;
line-height: normal;
}

Reference: http://stackoverflow.com/questions/8865458/how-to-align-text-vertically-center-in-div-with-css



Flag Counter