Skip to content

Instantly share code, notes, and snippets.

@sebastiano-guerriero
Last active July 25, 2018 08:26
Show Gist options
  • Select an option

  • Save sebastiano-guerriero/ac7fff8fb7ea3977c442954a95f22dc6 to your computer and use it in GitHub Desktop.

Select an option

Save sebastiano-guerriero/ac7fff8fb7ea3977c442954a95f22dc6 to your computer and use it in GitHub Desktop.
.parent {
position: relative;
.child {
width: 40%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment