On Sep 9, 5:04 pm, Allison <[EMAIL PROTECTED]> wrote:
> Hi all...
> Im building a website for the iphone.. i have a gallery... Now, Im
> wondering, is there a code where I can keep the page locked on
> vertical so it doesnt 'turn' when the iphone is turned around?
You can't, all you can do is detect the orientation and when it
changes[1] and adjust your CSS - but why do it anyway?
If someone is more comfortable viewing your site in landscape, why do
you want to stop them? If you use the device-width meta tag, content
can be made to size itself nicely regardless of the orientation,
something like:
<meta name="viewport" content="width=device-width">
> I dont
> want the site to be viewed when the phone is horizontal.
When you detect landscape, set body.style.display = 'none'; // :-)
Seriously, surely that is the viewers choice?
1. <URL:
http://groups.google.com.au/group/iphonewebdev/browse_frm/thread/66fb725fe24e3c27/b0cd55558c44658b?hl=en&lnk=gst&q=Tracking+orientation+without+setInterval#b0cd55558c44658b
>
--
Rob
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---