5 ms·
>limiting the width with max-width limited to at max width * aspectratio Sorry, I don't understand this.
by tzahola 8y ago
>limiting the width with max-width limited to at max width * aspectratio
Sorry, I don't understand this.
- detaro 8y agowhops, height not width. Code: max-width: calc(100vh * 16 / 9);
- tzahola 8y agoOk, this works only for fullscreen because of vh. Let's say I want this to work within another DIV too, so you can't use vh. (and the parent DIV's size is flexible, so you can't hardcode it into calc(...)).
- ricardobeat 8y agoFlexbox can handle that.
- tzahola 8y agoCould you show us how, in a JSFiddle or something?