Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force a scroll bar to appear in the ipad? (Mobile Safari) [duplicate]

I am having trouble getting a scroll bar to appear in mobile safari because overflow: auto does not work when there is scroll-able content. I found this css property:

-webkit-overflow-scrolling: touch

as some suggested this is a fix for mobile safari hiding the scroll bars but it's not working for me. Anyone have any suggestions on how I can force there to be a scroll bar in mobile safari to give the user a visual that they are supposed to scroll?

like image 899
FairyQueen Avatar asked Feb 12 '13 22:02

FairyQueen


People also ask

Is it possible to force the scroll bars to display on iOS?

I believe in iOS the scroll bar fades into the background when not in use. I don't believe you can force those little bars to display. - webkit-overflow-scrolling is only to force the scroll to be there, not necessarily to show the scroll bars I believe.

How do I force a scrollbar to show in HTML?

How To Force / Always Show Scrollbars Add overflow: scroll;to show both the horizontal and vertical scrollbar: Example body { overflow: scroll; /* Show scrollbars */ Try it Yourself » To only show the vertical scrollbar, or only the horizontal scrollbar, use overflow-yor overflow-x:

Is there a scroll bar option in System Preferences for Safari?

I am on Mac OS X and also in Safari browser windows the scroll bar sometimes isn't there, however in System Preferences there isn't a General option, and when I went on Appearance which seems is where the options of scroll bar behaviour are, there were no three options that I could choose Always from.

How to hide tab bar on iPad Safari?

Here’s how to hide the tab bar—or how to get it back. First, open Settings on your iPad by tapping the grey “gear” icon. Sorry, the video player failed to load. (Error Code: 100013) In Settings, scroll down through the sidebar and tap “Safari.” In Safari settings, swipe upward until you locate the “Tabs” section.


1 Answers

In your CSS include:

::-webkit-scrollbar {
    -webkit-appearance: none;
    width: 7px;
    height: 7px;
    -webkit-overflow-scrolling: auto;
}
::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background-color: rgba(0,0,0,.5);
    -webkit-box-shadow: 0 0 1px rgba(255,255,255,.5);
}

Customize the appearance as needed.

Stackoverflow source

Original source

like image 95
joseantgv Avatar answered Oct 13 '22 00:10

joseantgv