• 0

iPhone Safari and the Viewport Tag


Question

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?

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

With your code, it still scrolls for me. Did it work for you?

Didn't really know if it would work. I know this one does for width:

<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" />

So I just changed the widths to heights :)

Just checked with sites I've made in the past that are mobile friendly and they scroll vertically too even on small pages, so I don't think it's possible.

Link to comment
Share on other sites

  • 0

Didn't really know if it would work. I know this one does for width:

<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" />

So I just changed the widths to heights :)

Just checked with sites I've made in the past that are mobile friendly and they scroll vertically too even on small pages, so I don't think it's possible.

Does anyone know how to get rid of that extra scrolling space?

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.