Android browser bug? div overflow scrolling Android browser bug? div overflow scrolling android android

Android browser bug? div overflow scrolling


Android 3.0 and higher have support for overflow:scroll, on < 3.0 it's another story. You might have some success with polyfills like iScroll, however that does come at a cost. It's difficult to implement on sites with complex layouts, and you need to a call a method everytime the content on your site changes. Memory use is also an issue: on already underpowered devices performance may lag because of these kinds of polyfills.

I would recommend a different approach: use Modernizr to detect support for overflow scrolling , add a class to your html tag and use that to rewrite your CSS so that pages scroll 'normally' instead of in a box.

/* For browsers that support overflow scrolling */#div {    height: 400px;    overflow: auto;}/* And for browsers that don't */html.no-overflowscrolling #div {    height: auto;}


overflow: scroll; is supported as of Android 3 (API 11).

For a cross-platform (namely iOS <=4.3.2) Cubiq iScroll is an easy-to-implement fix.


You could try touchscoll.js for scrollable div elements