Created
June 30, 2014 20:14
-
-
Save harveyxia/719f19a10c8f0938b2e8 to your computer and use it in GitHub Desktop.
Vertically align using CSS3 transform
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
#parent > div { | |
position: relative; | |
top: 50%; | |
-webkit-transform: translateY(-50%); | |
} | |
/* source: http://zerosixthree.se/vertical-align-anything-with-just-3-lines-of-css/ */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment