Skip to content

Instantly share code, notes, and snippets.

@honzabilek4
Created August 29, 2017 09:27
Show Gist options
  • Save honzabilek4/c9c44b2055868b1500aa781bf497fa66 to your computer and use it in GitHub Desktop.
Save honzabilek4/c9c44b2055868b1500aa781bf497fa66 to your computer and use it in GitHub Desktop.
Vertical centering hack using transform.
.vertical-center {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment