windows phone 8 HTML5 viewport is higher than the screen after update to 8.0.10328.78
I have been having this issue in a Cordova/PhoneGap app as well. I even see the issue in Windows Phone 8 HTML5 apps when I am not using PhoneGap (just create a new project in Visual Studio 2012 from "Templates -> Visual C# -> Windows Phone HTML5 App"). This issue does not appear if you are loading the same HTML5 code from a hosted site using the IE app on Windows Phone 8.
The only thing that I have found to get the viewport to work correctly is to hide the system tray.
In MainPage.xaml change
shell:SystemTray.IsVisible="True"
to
shell:SystemTray.IsVisible="False"
This hides the system tray and makes your app a fullscreen app.
For some reason when the app is full screen the viewport behaves as expected.
jquery mobile position fixed in windows phone 8 and viewport height
@media screen and (orientation: portrait) {
@-ms-viewport {
width: 320px;
user-zoom: fixed;
max-zoom: 1;
min-zoom: 1;
}
}
Fixed footer issue on WP8 Emulator
Use iscroll4 and use few media queries in css:
@media screen and (orientation: portrait) {
@-ms-viewport {
width: 320px;
user-zoom: fixed;
max-zoom: 1;
min-zoom: 1;
}
}
@media screen and (orientation: landscape) {
@-ms-viewport {
width: 480px;
user-zoom: fixed;
max-zoom: 1;
min-zoom: 1;
}
}
This works fine on Windows Mobile 8 Phones. Here is a demo: http://jqtouch.rediffmailpro.com/iScroll/win8Example.html
White space at bottom in Windows Phone 8 phone gap app
Include this in Index.html,
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, target-densitydpi=medium-dpi, user-scalable=0" />
Include this in CSS:
@viewport
{
width:320px;
}
@-ms-viewport {
width:320px;
zoom-user:fixed;
max-zoom:1;
min-zoom:1;
}
and include also this,
body, html {
-ms-overflow-style: none !important;
}
This will solve the issue for now, it worked for me in the same situation..!!
:-)
Related Topics
CSS3 Onclick Activate Another Div's Animation
Text-Align: Center Placeholder Text in Select
Get a Div to Go Across The Whole Page
CSS for Double Height Text and Double Width Text in Font Style
Prevent Contenteditable Mode from Creating <Span> Tags
Fixed Positioned Div Is Extending Outside of HTML & Body
HTML5 Search Input: No Background Image in Chrome
CSS - Making a Div Consume All Available Space
Can Not Scroll <Body> While Fullscreen Is Enabled in Ms Ie11
What Version of Foundation Is Used in Cakephp3
How to Apply Different CSS Styles to 2 Elements with The Same Class Name
CSS3 Transform: Translate3D Doesn't Affect The Z-Axis
Sass "Error: Can't Find Stylesheet to Import."