Last Updated: February 25, 2016
·
17.76K
· Stereobit

Force users to use iPad landscape orientation

This sniped rotate the whole page when the user is in portrait orientation.

@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation:portrait) {
  body {
    -webkit-transform: rotate(90deg);
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
  }
}

2 Responses
Add your response

That's malicious, but cool.

over 1 year ago ·

brilliant.

was having a hell of a time fixing popups in portrait that work fine for landscape, this just solves the problem.

over 1 year ago ·