How Can I Fix The Webpage Orientation To Portrait Only For Ipad And Iphone?
I have developed a web app/website for the iPad but I can not get it stay in a fixed portrait view only. I do not want it to rotate and work in landscape mode, because of the way t
Solution 1:
Unfortunately, there is no way to explicitly "lock" the orientation of a web-app in Mobile Safari, as you can also see from the link that Alex posted above in the comment:
How do I lock the orientation to portrait mode in a iPhone Web Application?
However, you can have multiple CSS files for different screen orientations. There's a handy JavaScript snippet that you can copy-paste here:
http://www.catswhocode.com/blog/10-useful-code-snippets-to-develop-iphone-friendly-websites
This should at least allow you to design around the rotation without having to use JS but just CSS.
Post a Comment for "How Can I Fix The Webpage Orientation To Portrait Only For Ipad And Iphone?"