Created
February 24, 2019 16:44
-
-
Save dospuntocero/77d08cd7d108bdbd497091c399bff10f to your computer and use it in GitHub Desktop.
used this technique to expand an image to fill the whole div and maintain aspect ratio
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
.full-image-div{ | |
width:100%; | |
height:100%; | |
object-fit: cover; | |
overflow: hidden; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
actually, with just height 100% and object-fit will work, but in this case the other stuff was needed.