CSS

CSS

how to force mobile phones into landscape mode

August 31, 2015

updated 2015-09-23 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); } } @media only screen and (orientation:landscape){ #container...

Read more »