Q
Q
QWERTY012020-05-04 16:38:56
css
QWERTY01, 2020-05-04 16:38:56

What is the best option for the pictures to be the same height?

Code:
https://jsfiddle.net/ovbaq4ru/

I thought for the item_img class to set a fixed height, for example 200px and overflow hidden;
but if the picture is less than 200px, the situation will repeat itself....

How can I solve this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dnebl, 2020-05-04
@QWERTY01

.item__img img{
  width: 100%;
  height:200px;
  object-fit:cover;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question