actually you can't it delivers the layout viewport, which is 980/938 on an
iphone. Or maybe I am not understanding how to use it?


'How wide is the layout viewport? That differs per browser. Safari iPhone
uses 980px, Opera 850px, Android WebKit 800px, and IE 974px.'

http://www.quirksmode.org/mobile/viewports2.html


On Thu, Mar 17, 2011 at 9:27 AM, billreilly <[email protected]> wrote:

> Scott:
>
> You can use the innerWidth and innerHeight properties:
>
>        var myWidth = window.innerWidth;
>        var myHeight = window.innerHeight;
>
> They work in all browsers and all devices... also a great way to
> determine when the device changes orientation:
>
>        if (myWidth > myHeight) then you're in landscape mode
>        if (myWidth < myHeight) then you're in portrait mode
>
> Bill
>
> --
> 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.
>
>


-- 
"Local color. Soak it up"
Virginia Vidaura

http://www.merkwelt.com/people/stan/

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