Skip to content

Instantly share code, notes, and snippets.

@spenserpothier
Last active August 16, 2017 20:27
Show Gist options
  • Save spenserpothier/1fb0455040788e6ce88d to your computer and use it in GitHub Desktop.
Save spenserpothier/1fb0455040788e6ce88d to your computer and use it in GitHub Desktop.
CSS Snippet for vertical centered element
.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