I have a web game that needs to be presented in 16:9 in landscape mode (PCs), 9:16 mode in mobile phones, no matter the screen size.
So far, using stretch mode works nicely in landscape in PC and also in portrait in those phones that are close to 9:16. But on an ipad in portrait mode for instance things just don’t work because of its 4:3 aspect.
What I need is to make it so the game in portrait is always 9:16 (but 16:9 in landscape!), no matter the screen size - so the game will be narrower in screens like iPad’s, but will keep its looks. Don’t worry about content, I need the container.
My wild guess is that I have to combine stretch mode with proper CSS, but I’ve been trying o use flex, grid and undust my poor CSS knowledge to no avail.
Any clue how can this be done?