CSS

CSS

how to force mobile phones into landscape mode

August 31, 2015

updated 2019-12-29 How to force horizontal or landscape layout on mobile devices How to force a mobile device into landscape-horizontal mode or view all without javascript. add this to your style sheet .css #container { display:block; } @media only screen and (orientation:portrait){ #container { height: 100vw; -webkit-transform: rotate(90deg); -moz-transform: rotate(90deg); -o-transform: rotate(90deg); -ms-transform: rotate(90deg); transform: rotate(90deg); } }...

Read more »