Skip to content

Instantly share code, notes, and snippets.

@vidhav
Created October 27, 2015 21:42
Show Gist options
  • Save vidhav/5b2acd17eae7c4f28156 to your computer and use it in GitHub Desktop.
Save vidhav/5b2acd17eae7c4f28156 to your computer and use it in GitHub Desktop.
CSS Vertical Align
.parent-element {
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.element {
position: relative;
top: 50%;
transform: translateY(-50%);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment