How to realize that with a decrease in the width of the block, the height also decreases proportionally?
.cont{ max-width: 700px; border: 1px black solid; height: 400px; } <div class="cont"> </div> .cont { max-width: 700px; border: 1px black solid; } .cont div { height: 0; padding-top: calc(400 / 700 * 100%) } <div class="cont"> <div></div> </div> padding-top ? where are the numbers 400 and 700? It would be great if you explained all this and indicated that this is so-called. CSS gateway - Sasha OmelchenkoSource: https://ru.stackoverflow.com/questions/607387/
All Articles