Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.infosystems.www.authoring.html > #1872
| From | "J.R." <groups_jr-1@yahoo.com.br> |
|---|---|
| Newsgroups | comp.infosystems.www.authoring.html, comp.lang.javascript |
| Subject | Re: Sizing on android phone |
| Date | 2012-01-12 06:13 -0200 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <jem4mt$udc$1@speranza.aioe.org> (permalink) |
| References | <N-idnTeX_otixZfSnZ2dnUVZ_rudnZ2d@westnet.com.au> <jeluko$j2n$1@speranza.aioe.org> |
Cross-posted to 2 groups.
On 12/01/2012 04:29, J.R. wrote: > 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> There is an even better article at: <http://www.quirksmode.org/mobile/viewports2.html> > > Basically use (in strict mode): > document.documentElement.offsetWidth / offsetHeight > Sorry, but the correct code for retrieving the layout viewport dimensions in strict mode (W3C standard compliant mode) is: document.documentElement.clientWidth / clientHeight David Mark also wrote a good primer on measuring the viewport dimensions of desktop browsers:: <http://www.cinsoft.net/viewport.asp> >> >> 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.)
Back to comp.infosystems.www.authoring.html | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Sizing on android phone Andrew Poulos <ap_prog@hotmail.com> - 2012-01-09 14:03 +1100
Re: Sizing on android phone "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2012-01-08 21:23 -0800
Re: Sizing on android phone Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-01-09 12:15 +0100
Re: Sizing on android phone "J.R." <groups_jr-1@yahoo.com.br> - 2012-01-12 04:29 -0200
Re: Sizing on android phone "J.R." <groups_jr-1@yahoo.com.br> - 2012-01-12 06:13 -0200
Re: Sizing on android phone Arno Welzel <usenet@arnowelzel.de> - 2012-01-12 15:11 +0100
Re: Sizing on android phone Andrew Poulos <ap_prog@hotmail.com> - 2012-01-13 11:30 +1100
Re: Sizing on android phone Arno Welzel <usenet@arnowelzel.de> - 2012-01-13 14:52 +0100
Re: Sizing on android phone Dan <dan@tobias.name> - 2012-01-12 10:11 -0800
Re: Sizing on android phone Andrew Poulos <ap_prog@hotmail.com> - 2012-01-13 11:41 +1100
csiph-web