leanne1
leanne1

Reputation: 179

Disable zoom on mobile website for Android phones

I am building an responsive mobile website and need to disable zooming across all devices. I have used a meta tag which should in theory prevent zooming, and which works on iOS, windows Phone and some Android devices, but on several Android phones zooming is still enabled. Here is the meta-tag I have used:

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

I've also tried user-scalable=0. I know this is a known bug with Android but other sites have managed to disable zoom on the same phones that i am testing on e.g. http://m.bbc.co.uk/ so there must be a fix out there for this. Does anyone knows a reliable fix for this? Thanks!

Upvotes: 0

Views: 934

Answers (3)

*you should add this => maximum-scale=1

check this: a link

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, shrink-to-fit=no" />

Upvotes: 0

Khaled Developer
Khaled Developer

Reputation: 47

Set initial-scale=0. Try this:

<meta name="viewport" content="width=device-width, initial-scale=0">

check this : https://www.w3schools.com/css/css_rwd_viewport.asp

Upvotes: 0

emik
emik

Reputation: 953

Have you tried adding also maximum-scale=1.0?
Not shure this is the solution, but maybe worth a try.

Upvotes: 1

Related Questions