Skip to content

Instantly share code, notes, and snippets.

@afuggetta
Created September 3, 2015 19:08
Show Gist options
  • Save afuggetta/26ed3a0b447716bd232f to your computer and use it in GitHub Desktop.
Save afuggetta/26ed3a0b447716bd232f to your computer and use it in GitHub Desktop.
Centering elements in css
@mixin vertical-align($position: relative) {
position: $position;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment