Y
Y
Yura Storchak2019-12-08 01:42:37
css
Yura Storchak, 2019-12-08 01:42:37

Why don't images scale down proportionally as the screen shrinks, like after shrinking the 622px width resolution?

https://codepen.io/yrchik/pen/abbzOOY
Hi, why are images not scaled down proportionally when the screen is reduced, for example, after reducing the width resolution to 622px, the right and left sides go into the picture.
Put
.video-center {
width: 100%;
height: auto;
}
and put
html {
overflow-x: hidden;
}
What am I doing wrong ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladik Bubin, 2019-12-08
@ikoit

In order to change depending on the screen resolution, you need to set the width or height property

  • vh - equivalent to 1% of the browser window height.
  • vw - equivalent to 1% of the browser window width.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question