Last active
May 17, 2016 15:26
-
-
Save bannostookaylo/b54deaf588fa0060a38822a8dd8b9348 to your computer and use it in GitHub Desktop.
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
#center{ | |
background: #CCC; | |
padding: 30px 100px; | |
position: absolute; | |
left: 50%; | |
top: 50%; | |
white-space: nowrap; | |
transform: translate(-50%, -50%); | |
-webkit-transform: translate(-50%, -50%); | |
-moz-transform: translate(-50%, -50%); | |
-o-transform: translate(-50%, -50%); | |
} | |
/*** to position vertically add top 50% ***/ | |
/*** to position both add top 50% and translate(-50%, -50%) ***/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment