I've built a responsive site using Twitter Bootstrap here: http://zarin.me/cce/
The responsive design works great on iPad and iPhone, however when I flip the device from portrait to landscape, the site is zoomed in instead of adapting to the screen (pinching the screen works).
What am I missing? Is this a viewport issue? Here's the only viewport code I have in my :
<meta content="width=device-width, initial-scale=1.0" name="viewport">
Thanks in advance!
Try to force restart the device to fix it. Press and quickly release the volume up button, press and quickly release the volume down button, then press and hold the top button and keep it pressed until Apple logo appears, release the button and your iPad will finish booting up.
Turn off Zoom in Settings on your device If you can't access Settings because your Home screen icons are magnified, double tap with three fingers on the display to zoom out. To turn off Zoom, go to Settings > Accessibility > Zoom, then tap to turn Zoom off.
You also want to add the maximum scale
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
UPDATED I agree with some of the comments, the declaration should not limit the scaling by the user as this is bad practice. The below is a better approach and I believe that the zooming bug has long since been fixed by Apple.
<meta name="viewport" content="width=device-width, initial-scale=1">
While setting the maximum scale to "1" does work, it restricts your users from zooming in on anything within your site. Not ideal for user experience. Try this Javascript instead, iOS-Orientation Change Fix
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With