4 ms·
whops, height not width. Code: max-width: calc(100vh * 16 / 9);
by detaro 8y ago
whops, 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?