I want to keep the ratio of DIV For example I use google map
<div id="map" style="background-color: grey;width:100%;"> Map here </div>
It adjust the width to window or col-*
for bootstrap
.
it changes according to window size.
But now I want to keep the width:height ratio = 1 : 1
How should I do??
Same situation happens to img
I want to keep this img square
<img class="img-fluid" style="width:100%;">