- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Hi,
I am currently building a web app and I am importing a iframe of my website into the app. All works great except for the height does not show up correctly when I build and deploy my app on an android 5 or 6 device.
This is odd to me because it shows up correctly in the simulator but not in the built app...
code for iframe and css
<div id="main-div"> <iframe src="http://robbotdev.com" style="width: 100%; padding: 0px; height: 100%; margin: 0; border: none; display: block; overflow: hidden;"></iframe> </div> iframe { max-height: 100%; max-width: 100%; width: 100%; height: 100%; } #main-div { height:100%; }
- Balises:
- HTML5
- Intel® XDK
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
I actually answered my own question, Because of the new HTML Doctype not auto setting the html and body height to 100% I was having the height issue.
The solution was to set both the body and html height in app.css to 100%
Thanks to all who answered!
Lien copié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
I would search the web for something like "specifying iframe size in cordova phonegap app" to find some useful information. The XDK creates a standard Cordova app, so solutions for Cordova (aka PhoneGap) apps will also work in your XDK app.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Hi Robert,
Try using vh and vw units instead of %.
https://snook.ca/archives/html_and_css/vm-vh-units
Regards,
Diego
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
That would work but I am getting the error " value 100vh not supported"
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Robert -- you're probably getting that from an Android 4.x device, because the built-in webviews on those devices are quite old and do not support many modern HTML5 features. You'll have to build with Crosswalk to get a modern set of features on Android 4.x devices. For Android 5+ the feature set is up-to-date.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
I actually answered my own question, Because of the new HTML Doctype not auto setting the html and body height to 100% I was having the height issue.
The solution was to set both the body and html height in app.css to 100%
Thanks to all who answered!

- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable