I want my div to adapt its height to always equal its width. The width is percental. When the parent’s width decreases, the box should decrease by keeping its aspect ratio.

How to do this is CSS?

6 Answers
6

Leave a Reply

Your email address will not be published. Required fields are marked *