Maxim V. Pavlov
Maxim V. Pavlov

Reputation: 10509

Set default 100% zoom for iOS safari site rendering

My web page is slightly larger then the iPad resoltion, so when I open it in iPad Safari window, it is horizontally scrollable. When I pinch out the view, the web site looks perfect. Can I, via setting some tags like viewport or some other, get the page to be fully displayed as soon as it loads?

Upvotes: 5

Views: 7451

Answers (2)

DannyTheDev
DannyTheDev

Reputation: 4173

This stops the user from being able to re-scale the page as well, you can toggle this by changing user-scalable to 1 or limiting the amount of scalability by changing maximum-scale

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

Upvotes: 9

Andrea Turri
Andrea Turri

Reputation: 6500

In this way:

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

Documentation: http://developer.apple.com/library/ios/#DOCUMENTATION/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html

Upvotes: 13

Related Questions