Created
January 6, 2018 06:54
-
-
Save rickhernandezio/48f8808a9a9c36db0896d76e74e99e84 to your computer and use it in GitHub Desktop.
How to vertically align an image with CSS?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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