Skip to content

Instantly share code, notes, and snippets.

@a-v-ebrahimi
Created February 11, 2016 06:16
Show Gist options
  • Save a-v-ebrahimi/f814ebe0c8eab9b26b7e to your computer and use it in GitHub Desktop.
Save a-v-ebrahimi/f814ebe0c8eab9b26b7e to your computer and use it in GitHub Desktop.
Center align a block vertically in CSS
.center-align-vertically {
position: absolute;
top: 50%;
transform: translateY(-50%);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment