Answer the question
In order to leave comments, you need to log in
How to set relative height?
Hello, I need to somehow set the relative height, so that when the width changes, the height adjusts, let's say the element has a width of 1000px, so the height should be 300px, if you increase the width to 3000px, the height will be 600px, in general, you need the height to always be 30 % of width.
Answer the question
In order to leave comments, you need to log in
Если ширина контейнера как-то соотносится с шириной окна (экрана), то можно высоту задать в vw.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question