Last active
August 2, 2016 19:47
-
-
Save digitalbocca/627893a8698bf4efb1dc797f0ea6464c to your computer and use it in GitHub Desktop.
Um exemplo de alinhamento vertical com CSS que funciona atualmente.
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
| /** | |
| * Basta usar a classe .center na div que você precisa centralizar | |
| */ | |
| html,body{ | |
| height: 100%; | |
| min-height: 100%; | |
| position: relative; | |
| margin: 0; | |
| } | |
| .center{ | |
| width: 100%; | |
| text-align: center; | |
| position: absolute; | |
| top: 50%; | |
| transform: translateY(-50%); | |
| -webkit-transform: translateY(-50%); | |
| -ms-transform: translateY(-50%); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment