Last active
August 29, 2015 14:24
-
-
Save tlareg/959924f5d79e45cffc03 to your computer and use it in GitHub Desktop.
vertical align middle multiline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.va-middle { | |
max-width: 100px; | |
line-height: /*set height*/; | |
} | |
.va-middle > span { | |
display: inline-block; | |
vertical-align: middle; | |
line-height: 1em; /*set line height back to normal*/ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="va-middle"><span>multiline text</span></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment