Skip to content

Instantly share code, notes, and snippets.

@rickhernandezio
Created January 6, 2018 06:54
Show Gist options
  • Save rickhernandezio/48f8808a9a9c36db0896d76e74e99e84 to your computer and use it in GitHub Desktop.
Save rickhernandezio/48f8808a9a9c36db0896d76e74e99e84 to your computer and use it in GitHub Desktop.
How to vertically align an image with CSS?
.vertical-align {
position: relative;
top: 50%;
transform: perspective(1px) translateY(-50%);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment