Skip to content

Instantly share code, notes, and snippets.

@kylesuss
Created January 14, 2014 22:31
Show Gist options
  • Select an option

  • Save kylesuss/8427238 to your computer and use it in GitHub Desktop.

Select an option

Save kylesuss/8427238 to your computer and use it in GitHub Desktop.
.parent {
position: relative
}
.child {
width: 100%;
display: block;
position: absolute;
top: 50%;
-webkit-transform: translateY(-50%);
-moz-transform: translateY(-50%);
-o-transform: translateY(-50%);
transform: translateY(-50%);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment