You can use calc();
option in css.
For example; if your wrapper div is 100%
in height, it is 100vh
. Than you can use this to set inner divs width and height:
.innerdiv {
height: 20vh;
width: 20vh;
}
Read about it here: https://css-tricks.com/viewport-sized-typography/
Support is decent: http://caniuse.com/#search=vw
3
solved divs positioning in parent div keeping aspect ratio by height [closed]