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;
}
}
Written by Tobias Otte
Related protips
2 Responses
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
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Css
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#