user782104
user782104

Reputation: 13555

How to set not to zoom on the mobile device?

Here is the test link:

http://kotechweb.com/ig112

The site now is exactly the way I would like to present, one problem is , if I set to

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

on mobile it will zoom

And I tried to set

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

However, this will affect the layout and some block will move into wrong position.

So, I wonder how to set not to zoom in mobile by default? Javascript/ jquery is also welcome if meta can not fulfill the needs

Thanks.

Update:

Thanks for answering.

Either no scrollable , max scale =1 , min scale = 1, the inital width is still the zoomed version, and can not scale down this time.

Sorry for confusing, the idea is , can the width begin is exactly the width of device? then it is not zoomed

Or what I need to do is to zoom to the smallest scale.

Upvotes: 0

Views: 80

Answers (3)

user782104
user782104

Reputation: 13555

just removed initial-scale=1 , then it will not zoom

Upvotes: 0

R&#233;mi Vansteelandt
R&#233;mi Vansteelandt

Reputation: 179

The user-scalable parameter should do it.

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

Otherwise, you can set minimum-scale and maximum-scale to 1.0

Upvotes: 4

kidroca
kidroca

Reputation: 3896

Using the user-scalable attribute

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

Upvotes: 2

Related Questions