how to equal different height and width images in css code example
Example: equal height and width image css
.container {
position: relative;
width: 37%;
}
.container:after {
content: "";
display: block;
padding-bottom: 100%;
}
.container img {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
}
//Credit for the great answer of "Amaury Hanser", on stackoverflow:
//https://stackoverflow.com/questions/51447317/image-height-same-as-width