Skip to content

Instantly share code, notes, and snippets.

@0632347878
Created October 2, 2016 17:07
Show Gist options
  • Save 0632347878/2753d3874ae221928848d87b07769b59 to your computer and use it in GitHub Desktop.
Save 0632347878/2753d3874ae221928848d87b07769b59 to your computer and use it in GitHub Desktop.
positioning relative to parent
.positionedBlock {
position: absolute;
left: 50%;
top: 50%;
transform: translateX(-50%) translateY(-50%);
max-width: 700px;
width: 100%;
}
.parent {
position: relative;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment