Reputation:
How do you force an iPhone web app (not a native app) into landscape mode?
Upvotes: 6
Views: 8108
Reputation: 442
I don't know how to force it on startup, but I found a neat way to make your content scale correctly when changing from Portrait to Landscape, especially if you're using canvas.
<head>
<meta name="viewport" content="initial-scale=1.6; maximum-scale=1.0; width=device-width; "/>
...
</head>
So, as soon as your user flips the phone to landscape mode, your page will appear in the correct scale.
Upvotes: 5
Reputation: 486
I do not think it is possible to force the device into landscape mode. It is possible to detect when the device is in landscape mode. See here for example javascript: http://www.engageinteractive.co.uk/blog/2008/06/19/tutorial-building-a-website-for-the-iphone/
Upvotes: 1