Created
May 28, 2014 07:11
-
-
Save mrkodssldrf/891d934d10de2492344c to your computer and use it in GitHub Desktop.
Vertical align elements without fixed height
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
---CSS | |
/* Helper to vertical align content*/ | |
.vhelper { height: 100%; padding: 0;} | |
/* Vertical-Alignment without given height */ | |
.vhelper, .justify-middle { display: inline-block; vertical-align: middle; } | |
---HTML | |
<span class="vhelper"></span> | |
<div class="justify-middle">--Content--</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment