Skip to content

Instantly share code, notes, and snippets.

@animanoir
Last active November 12, 2020 02:14
Show Gist options
  • Save animanoir/ab5c647b70926c9579fc1033d3e89706 to your computer and use it in GitHub Desktop.
Save animanoir/ab5c647b70926c9579fc1033d3e89706 to your computer and use it in GitHub Desktop.
Center a div
.centrar{
position: absolute;
top: 50%;
left: 50%;
/*El translate hace que el punto de anclaje esté en el centro.*/
transform: translate(-50%, -50%);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment