A
A
Andrej Sharapov2019-08-29 09:49:17
Layout
Andrej Sharapov, 2019-08-29 09:49:17

How to calculate insta frame height relative to width?

Good morning, guys.
There is an adaptive frame that displays an image / is visible from instagram. The frame size is 100% of the filled area (container), regardless of the screen resolution. Maximum 500px. But he has 1 minus - this is the height.
Tell me, how best to calculate the height so that it ages under relative to the width?
I tried to do it by analogy with fonts , through CALC and 100vh, but it still doesn’t work out.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zoozag, 2019-08-29
@zoozag

so that it ages to fit the width, relative to the width?

If it's relative to the width, then you don't need vh, but vw.
In general, it is not entirely clear what you are doing with the height and what result you want to get.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question