How to stop a webpage from zooming with iPhone?

Some mobile websites, such as the BBC mobile website , stop zooming in on the iPhone’s main home page - as it happens. Is there a directive to be included in the HTMl code or something else?

+5
source share
2 answers

You just need to say that the iPhone does not allow the user to zoom in using the meta tag:

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

This will still allow your webpage to rotate, but not scale.

+10
source

, ​​ iPhone. Mobile Safari 100% , ( 1000 ), , .

, iPhone 320px.

CSS :

div#wrapper
{
  width: 320px;
}
+1

All Articles