Created
August 29, 2017 09:27
-
-
Save honzabilek4/c9c44b2055868b1500aa781bf497fa66 to your computer and use it in GitHub Desktop.
Vertical centering hack using 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
.vertical-center { | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
transform: translate(-50%, -50%); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment