The short answer is no, you can't lock the orientation AFAIK.

What you can do is to apply a webkitTransform rotate and translate to
put the content of a div back the way you want it when the iPhone
orientation changes.

Remember that the width and height of the visible window change when
rotating as well so your content has to be designed to look good in
both views.

As the iPhone is rotated, the O/S will start the adjustment and then
onorientationchange will fire so you can snap it back to the fixed
view - a bit ugly. If there are any events that fire earlier which
would allow hiding and restoring, I'd love to hear about them.

As onorientationchange doesn't fire in a saved to home page webapp,
you also need a timer to check for the width vs height change.

On Oct 27, 10:52 am, l008com <[email protected]> wrote:
> Is there a way to force landscape mode from a webapp? That means the
> content would appear sideways, "wide" no matter how you held the
> device.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to