So you should look at window.orientation javascript property. It has the value 
to 0 for portrait 90 or -90 when landscaped.

Remi Grumeau
http://www.remi-grumeau.com

Le 16 févr. 2010 à 10:12, Bart a écrit :

> http://www.vliegendepijl.nl/streep
> 
> When I switch to landscape and then refresh it does load unscaled/
> properly. I've tried body[orient:landscape] > div which did not seem
> to help. If you could have a look, much appreciated :)
> 
> On Feb 16, 12:43 am, Remi Grumeau <[email protected]> wrote:
>> Perhaps setting in the CSS file the width: 320px for both body > div and 
>> body[orient:landscape] > div can help...
>> Any URL to showcase ?
>> 
>> Le 15 févr. 2010 à 22:31, Bart a écrit :
>> 
>> 
>> 
>>> Hello all,
>> 
>>> I have a page with a div in it which has a width of 320px. I have my
>>> viewport set up as follows;
>> 
>>> <meta name="viewport" content="width=device-width, initial-scale=1.0,
>>> user-scalable = no" />
>> 
>>> When I load my page in the iphone simulator in portrait mode it loads
>>> just like I want it. The div loads with a width of 320px and safari
>>> can't scroll horizontally. However when I switch to landscape (meaning
>>> the viewport gets a width of 480px, right?) that same 320px div is now
>>> scaled in such a way that it spans the entire horizontal width, 480px
>>> and now it can scroll horizontally.
>> 
>>> How can I prevent this so that it loads the 320px div just like in
>>> portrait mode with the rest 160px just white space and still no
>>> horizontal scroll?
>> 
>>> All help is appreciated :)
>> 
>>> --
>>> 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 
>>> athttp://groups.google.com/group/iphonewebdev?hl=en.
> 
> -- 
> 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.
> 

-- 
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