I am trying to disable zoom on mobile devices. I know this code will work.
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
But in my case, i have not the option to use "width=device-width". I have to set the viewport size to 480px so i am using the following code
<meta name="viewport" content="width=480px, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
But i get a zoomed in view of the page on mobile device and i am able to zoom it out.
Using "target-densitydpi=device-dpi" and hence the code
<meta name="viewport" content="width=480, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0,target-densitydpi=device-dpi, user-scalable=no" />
fixed my problem. Thanks to Dave Rook
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With