Web views "shrink" the web page

Forum to ask for any help
Post Reply
AKWillows
Posts: 53
Joined: Mon Aug 25, 2014 5:46 pm

Web views "shrink" the web page

Post by AKWillows » Fri Nov 04, 2016 6:54 pm

Hi

So, I'm trying to incorporate a webview, but finding it is "shrinking" the web page on display.

So, I have a very simple webpage hosted locally which contains a widget 320px x 320px - and nothing else. I imagined that I could add a webview of the same dimensions to the app and it would display at the proper size. However, what it does is to shrink the widget to a quarter of its size so that it only fills the top right quarter of the web view box.

Is there any way I can control the "zoom" in the web view box, or do I need to do something to the web page itself?

Anyone else had any similar experience?

Jonathan
Posts: 2
Joined: Fri Aug 22, 2014 8:25 pm

Re: Web views "shrink" the web page

Post by Jonathan » Sat Nov 05, 2016 9:57 am

May be a long shot, but try adding something like his into the header of the page e.g.:

Code: Select all

<head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
</head>
There's more information here:
https://developer.apple.com/library/con ... wport.html

AKWillows
Posts: 53
Joined: Mon Aug 25, 2014 5:46 pm

Re: Web views "shrink" the web page

Post by AKWillows » Sat Nov 05, 2016 5:05 pm

You are a star!

That worked perfectly :) Thank very much!

Post Reply