Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
22 Views

Intel XDK - IOS App page stretches continiously but code works on Android

Hello

I have built an App using HTML5. DIv & images sizes have been set using screen percentage.

i.e.

<img src="1.jpg" width="100%" height="100%">

This approach works fine and the page adjusts on web-browsers and andriod devices. However on IOS the page continually stretches and stretches the page outwards.

Is there some code that needs to be inserted to stop this from happening?

 

Many Thanks,

Kevin

 

Tags (2)
0 Kudos
1 Reply
Highlighted
Employee
22 Views

It's hard to diagnose. 


But have you looked at using vw/vh coordinates instead of %?  The percentage is tricky, because it is very nesting sensitive. But the vh and vw coordinates are simple: percentage of viewport width (or viewport height).

This simple CSS rule might be all you need:

img {
  width: 100vw;
  height: 100vh;
}

 

0 Kudos