Last active
December 16, 2015 07:29
-
-
Save ghernandez345/5399325 to your computer and use it in GitHub Desktop.
Vertical align elements on page
This file contains hidden or 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="info-box"> | |
<div class="icon"></div> | |
<div class="info-data-container"></div> | |
</div> | |
/* parent element */ | |
.info-box { | |
} | |
/* child elements | |
------------------------ | |
make sure that you do not have either child floating. | |
*/ | |
.icon { | |
display: inline-block; | |
vertical-align: middle; | |
} | |
.info-data-container { | |
display: inline-block; | |
vertical-align: middle; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment