A
A
Alexander2019-07-23 11:58:07
css
Alexander, 2019-07-23 11:58:07

CSS height: auto for IE how to fix?

5d36cbdd80c65105331773.png
Page https://playdrone.ru/catalog/nazemnyy-transport/av...
Images of cars in IE are stretched in height.
Physically, the images are larger than the container, so they are scaled with
max-width: 100%;
max-height: 100%
width: 100%
height: auto;
And it works great in all browsers except our dearly beloved IE. Tell me how to fix the layout bug for the IE (Edge) browser, I already broke my brain.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
lagudal, 2019-07-23
@Alexx_ps

try for the wrapper class - img_box - instead of height: 270px set max-height: 270px

A
Anton Usachov, 2019-07-23
@rockfeeler

Well, if edge, then he should understand such constructions:

img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question