there are different images that i want to display inside a div box, whatever the image size, Div box size should be the same.
I couldn’t fit the image, when the image is larger, it goes out of the div box. that affects the Ui of my website that I am trying to create.
2
Answers
You need
object-fit
.See the below code as an example and you need to make changes accordingly in your code.
Here I am having a main div as image-container. I am applying CSS to div and image inside the div.
Hope it helps and see how it goes.