Answers for "make image take up entire div"

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%
}
Posted by: Guest on March-21-2021
0

how to make img cover parent div

img {
	object-fit: cover;
}
Posted by: Guest on February-27-2021

Code answers related to "make image take up entire div"

Browse Popular Code Answers by Language