- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
- HTML5
- Intel® XDK
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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; }
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page