Created
September 27, 2016 01:00
-
-
Save gartenfeld/24ec6ad9b12090974448821c0823a979 to your computer and use it in GitHub Desktop.
Centering without Flexbox
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
// Add full screen wrapper | |
.box { | |
top: 50%; | |
left: 50%; | |
margin: 0; | |
position: absolute; | |
transform: translate(-50%, -50%); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment