Last active
March 29, 2018 12:05
-
-
Save revooms/92a871d78308af8ad2fe4cfcf5165258 to your computer and use it in GitHub Desktop.
Vertical align image in container
This file contains hidden or 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
| .image-va { box-sizing: content-box; width:100%; height:100%; vertical-align: middle; text-align: center; background-color:lime} | |
| .image-va img { border:0 !important; margin:0 !important; max-width: 100%; max-height: 100%; vertical-align: middle;} | |
| .image-va .helper { display: inline-block; height: 100%; vertical-align: middle;} |
This file contains hidden or 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
| <div class="image-va"> | |
| <span class="helper"></span><img src=""> | |
| </div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment