4 ms·
You are setting `width: 100vw;` which is why it doesn't work. Try something like this: https://jsfiddle.net/pgaz7cmx/ https://jsfiddle.net/pgaz7cmx/, which set
by amenghra 4y ago
You are setting `width: 100vw;` which is why it doesn't work.
Try something like this: https://jsfiddle.net/pgaz7cmx/ https://jsfiddle.net/pgaz7cmx/, which sets both, width and max-width.
- zamadatix 4y agoHuzzah! I don't think I ever would have thought to set both width and max-width (to > 100 vw no less!). Makes sense now that I see it though, thanks!
- amenghra 4y agomax-width gets set to vh, not vw. I do dislike this solution because the ratio is encoded twice. I’m sure there are other ways to achieve the same, some are perhaps more elegant?