user945620
user945620

Reputation:

In UIWebView, DIV is scrolling differently in iOS 4.3 and 5.0

I've got a DIV whose contents are about 2000 pixels wide. The DIV is maybe 150 pixels high and doesn't scroll vertically (or need to). However I do need it to scroll horizontally. This does happen... on iOS 5.0. On iOS 4.3 for some reason it isn't working.

The pertinent CSS for this DIV seems to be:

    overflow:scroll;
    margin:0;
    height:auto;

Can anyone explain how I can make this scroll properly on 4.3? Thanks.

Upvotes: 0

Views: 600

Answers (2)

antisquark
antisquark

Reputation: 1

Check out https://github.com/richardscarrott/jquery-ui-carousel, he's implemented a simple and straightforward plugin for scrollable carousels that seems to work just fine in iOS.

Upvotes: 0

sciritai
sciritai

Reputation: 3758

overflow: scroll is only supported in iOS5+. That's the long and short of it.

http://davidbcalhoun.com/2011/new-mobile-safari-stuff-in-ios5-position-fixed-overflow-scroll-new-input-type-support-web-workers-ecmascript-5

You could mock the feature by using a library like iScroll, but I don't recommend it. The scrolling performance is terrible and memory usage is unacceptable.

Upvotes: 1

Related Questions