1

im trying to block the option to zoom (in or out) in my website. i tried to put this meta code:

<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />

but unfortunately no success... any ideas?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
yoash
  • 35
  • 9

1 Answers1

1

You should add maximum-scale=1.0

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

But it is for mobile devices.

If you are using desktop, it is a bit complicated. You can use javascript to block some keys. Here are some useful links:

  1. Prevent zoom cross-browser

  2. Disable zooming of the page in desktop web browsers using Javascript/Jquery [duplicate]

Community
  • 1
  • 1