fill image in div css code example
Example 1: image to fill div
.fill {
display: flex;
justify-content: center;
align-items: center;
overflow: hidden
}
.fill img {
flex-shrink: 0;
min-width: 100%;
min-height: 100%
}
Example 2: make image stretch to fit div
Just apply without any changing any code
img {
width: 100%;
}