Created
December 25, 2015 13:49
-
-
Save rocknrollskyoveryou/6dda39abf8bfd8fa479e to your computer and use it in GitHub Desktop.
Vertical align <span> inside <div>
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
#html | |
<div> | |
<span>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</span> | |
</div> | |
#scss | |
div{ | |
height: 25px; | |
line-height: 25px; | |
text-align: center; | |
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