On 09/01/2012 01:03, Andrew Poulos wrote:
> I've a basic page which, onload, returns the viewport size.
>
> When I run the page on a Samsung GS it returns 450 x 320.
>
> When I create a small elearning course designed to run at 450 x 320 the
> course ends up occupying just the top quarter of the screen. (Because of
> the required user interaction I've had to disallow the default actions
> for swipes but not gestures.) If the course queries the viewport size it
> returns 1125 x 800.
There is a good explanation on measuring the viewport dimensions of a
mobile device browser at:
<
http://www.quirksmode.org/mobile/viewports.html>
Basically use (in strict mode):
document.documentElement.offsetWidth / offsetHeight
>
> To get it to "fill" the screen I added
> <meta name="viewport" content="width=device-width">
> to the head.
>
> My questions are
> - I don't understand why the viewport size changes between my basic page
> and the course on the same device.
Maybe because of the css in use, invalid html+xml markup, and/or the JS
code used to retrieve the viewport dimensions.
> - Will <meta name="viewport"> be supported on Windows phones?
I'll pass on this one.
--
Joao Rodrigues (J.R.)