I am looking for a way to lock the screen orientation to landscape for all mobile device browsers when accessing a website. I couldn't get a clear result when searching cause it always gives results for app creating and locking but not for websites.
Apparently this "kinda" (it does rotate the entire website but it keeps the width of portrait mode) works for Android but not at all in IOS..even in android isn't perfect:
/* if portrait mode is detected, rotate the entire site -90 degrees to hint rotating to landscape */
@media (orientation: portrait) {
body {
-webkit-transform: rotate(-90deg);
-moz-transform: rotate(-90deg);
-o-transform: rotate(-90deg);
-ms-transform: rotate(-90deg);
transform: rotate(-90deg);
}
}