Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to center align the maximum-scale viewport zoom for iphone

When I set a maximum scale and when I rotates orientations back and forth, the web page isn't centered on the phone.

So using this code

  <meta name="viewport" content="width=device-width; initial-scale=0; maximum-scale=2;">

How can I mimic the CSS effect of margin: 0 auto;.

like image 356
Dan Avatar asked Oct 21 '10 04:10

Dan


1 Answers

For people arriving here from Google, you should also look at the following page on Apple[1].

The viewport tag is quite helpful.

[1]: http://developer.apple.com/library/IOS/#documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html Using the ViewPort

like image 99
Nathan Garrett Avatar answered Oct 13 '22 20:10

Nathan Garrett