0

I have created an application which will work only on limit zoom level. So I need to restrict that user can zoom the limited level.

I have tried with,

<meta name="viewport" content="initial-scale=1, maximum-scale=1">

But it always allows upto the device.

Vinoth Rajendran
  • 1,181
  • 1
  • 13
  • 28
  • Have you tried to add **user-scalable=no** ? – QqQq Feb 06 '18 at 07:28
  • I have tried this. But still browser allows more zoom. – Vinoth Rajendran Feb 06 '18 at 07:49
  • 1
    Oh i see, if you using Safari on iOS 10+: https://stackoverflow.com/a/37859168/4769339 `To improve accessibility on websites in Safari, users can now pinch-to-zoom even when a website sets user-scalable=no in the viewport.` – QqQq Feb 06 '18 at 07:54

1 Answers1

1

You need to adjust your media query to prevent zooming

try this

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
Jason McFarlane
  • 2,048
  • 3
  • 18
  • 30