5

Anyone experiencing the same problem ?

content = "width=device-width" <-- this viewport is suppose to scale your webapp to the appropriate size in iphone.

It works while my iphone is still i0S 6 and I have just updated to iOS 7 and seems like its not working anymore....or perhaps its something else that is causing the problem?

anyone has any ideas?

right now i am using these four viewports

content="width=device-width, maximum-scale=1.0" />
<meta name="viewport" content="initial-scale=1.0">
<meta name="viewport" content="width=device-width">
<meta name="viewport" content="user-scalable=yes" />`
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />

1 Answer 1

8

I just ran into this problem. It turns out you have to put the viewport information on one line. In previous versions of iOS the viewport information would be cumulative. Now it only uses the last one.

Try this:

<meta name="viewport" content="initial-scale=1.0,width=device-width,user-scalable=yes" />
2
  • hey matt, is it possible to app these two into the same meta tag up there? <meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    – Jerry Lai
    Sep 20, 2013 at 1:29
  • @JerryLai Nope, don't think so. This trick only works if both meta assignments have the same name (e.g. "viewport"). In your case they both have different names.
    – Timo Ernst
    Jan 8, 2014 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.