locked
iPhone Safari and the Viewport Tag RRS feed

  • Question

  • User-659891237 posted

    I'm putting this tag at the header of my HTML pages, trying to get the page to stop vertical scrolling on mobile browsers like iPhone Safari:
     <meta name="viewport" content="width=device-width, height=device-height" />
     But as shown here, it doesn't work: http://wesspace.net/viewport.aspx
     Note that there is no content to see when scrolling down, so no scrolling is necessary. But if a user pushes the page up with a finger (in other words, scrolling down), a blank area is revealed. This bug only occurs on mobile browsers, except Fennec, which does a great job. So does anyone know how to prevent the user from scrolling down into the void?

    I'm putting this tag at the header of my HTML pages, trying to get the page to stop vertical scrolling on mobile browsers like iPhone Safari:

    <meta name="viewport" content="width=device-width, height=device-height" />

    But as shown here, it doesn't work: http://wesspace.net/viewport.aspx

    Note that there is no content to see when scrolling down, so no scrolling is necessary.  But if a user pushes the page up with a finger (in other words, scrolling down), a blank area is revealed.  This bug only occurs on mobile browsers, except Fennec, which does a great job.  So does anyone know how to prevent the user from scrolling down into the void?

    Tuesday, September 28, 2010 6:13 PM

All replies

  • User1943143334 posted

    Hi,

    Try the following meta tag.

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


     

     

    Hope it helps u... 

    Tuesday, September 28, 2010 11:37 PM
  • User-659891237 posted

    Using your code, the page still scrolls for me.  Did it work for you when you tried it? 

    Wednesday, September 29, 2010 3:22 AM