I'm currently working on a Phonegap app and I have the following problem when testing it with Windows Phone 8 (left screenshot below): the application bar is not removed and leaves a big white space.
From various sources I learned that the following meta tag is ignored by WP8:
<meta name="viewport" content="width=device-width, height=device-height">
So you have to define it again using the "ms" pre-tag:
@-ms-viewport {
height: device-height;
width: device-width;
}
But doing so kind of messes up with the scaling of the app. Any idea what is going on?
Here the before after screenshot:
viewport
meta tag is not ignored, WP just (intentionally) returns wrong values fordevice-width
anddevice-height
, usually resulting in a scaling factor of 1.5 for better readability. – Dhowdevice-width
anddevice-height
, which would be 480/800 for all WP7 and most WP8 devices. I've been experimenting with dynamically inserting the viewport meta tag from native app code (which obviously knows its screen dimensions), but dynamic meta tag changes seem to be ignored by the browser. Also see my related Question, especially the update on the bottom. – Dhow