Oleh Herych
Oleh Herych

Reputation: 905

Ipad and CSS attribute overflow

I tried to add right scroll in div. This works in most browsers, but not properly when using iPad Safari. Does the iPad not suported this css attribute?

I prepared test html. It do not work too.

<html>
    <head>
        <style>
            .ounner {
                border: solid 1px red;
                width:300px;
                height: 500px;
                overflow:scroll ;
            }
            .inner{
                border: solid blue 1px;
                height: 700px;
                width: 400px;
            }
        </style>
    </head>
    <body>
        <div class="ounner">
            <div class="inner">
                sdsd
            </div>
        </div>
    </body>
</html>

Upvotes: 0

Views: 7487

Answers (2)

Filip Hlad&#237;k
Filip Hlad&#237;k

Reputation: 11

I have used css:

-webkit-overflow-scrolling: touch;

and scrolling works with 1 finger as well (iPad 2, iOS 5.1.1).

Hope it helps, Filip

Upvotes: 1

Matt
Matt

Reputation: 385

overflow: auto and overflow: scroll are supported on MobileSafari, but since scrollbars are not used on iOS, to scroll these areas one must use two fingers.

There is a JavaScript library called iScroll that handles touch events and implements one-finger momentum scrolling manually; perhaps that would be worth looking into.

Upvotes: 1

Related Questions