views:

638

answers:

1

I made a small webpage with a scrollable div. When I load it in a browser, it works fine. But when I load it in a webview inside Android, it doesn't let me scroll the div. Is there a workaround for this or do I have to use a different design? I am talking about websites like this.

A: 

Unfortunely, scrollable div's just aren't supported on most current mobile Webkit browsers. A great alternative to native support is the iScroll Javascript library, which can simulate real scrolling:

http://cubiq.org/iscroll

Copy/pasted from the project description on that page:

The overflow:scroll for mobile webkit. Project started because webkit for iPhone does not provide a native way to scroll content inside a fixed size (width/height) div. So basically it was impossible to have a fixed header/footer and a scrolling central area. Until now.

Version 3.3 and later support Android >= 1.5.

David Snopek