Skip to content

Instantly share code, notes, and snippets.

@digitalbocca
Last active August 2, 2016 19:47
Show Gist options
  • Select an option

  • Save digitalbocca/627893a8698bf4efb1dc797f0ea6464c to your computer and use it in GitHub Desktop.

Select an option

Save digitalbocca/627893a8698bf4efb1dc797f0ea6464c to your computer and use it in GitHub Desktop.
Um exemplo de alinhamento vertical com CSS que funciona atualmente.
/**
* 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