Skip to content

Instantly share code, notes, and snippets.

@ghernandez345
Last active December 16, 2015 07:29
Show Gist options
  • Save ghernandez345/5399325 to your computer and use it in GitHub Desktop.
Save ghernandez345/5399325 to your computer and use it in GitHub Desktop.
Vertical align elements on page
<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