Skip to content

Instantly share code, notes, and snippets.

@badcrocodile
Forked from anonymous/index.html
Last active August 29, 2015 14:05
Show Gist options
  • Save badcrocodile/fb7b18833d33857fba92 to your computer and use it in GitHub Desktop.
Save badcrocodile/fb7b18833d33857fba92 to your computer and use it in GitHub Desktop.
Center text vertically
<div>
<span>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</span>
</div>
div {
width: 250px;
height: 100px;
line-height: 100px;
text-align: center;
border: 1px solid #123456;
}
span {
display: inline-block;
vertical-align: middle;
line-height: normal;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment