2

How can I make the overflow scrollbar visible on mobile devices? The scrollbar is visible on desktops but not on mobile devices. I need it to show on iPhones and Samsungs. So also Safari browsers. Is that even posibble?

This is what I have for now.

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); 
    -webkit-border-radius: 10px;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    -webkit-border-radius: 10px;
    border-radius: 10px;
    background: rgba(77, 168, 65, 1); 
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); 
}

::-webkit-scrollbar-thumb:window-inactive {
    background: rgba(77, 168, 65, 1); 
}
5
  • 1
    Possible duplicate of How do I get scrollbars to show in Mobile Safari? Commented Nov 18, 2018 at 14:50
  • @ItayGal Please do not redirect me to a post that is 8 years old. That info does not even work anymore. I have seen that post and tested. Does not work. Commented Nov 18, 2018 at 14:53
  • It worked for me a month ago, no reason to answer the same question twice Commented Nov 18, 2018 at 14:54
  • @ItayGal, I need to force it to show on mobile. Not desktop. These answers are all for desktop views. I need to have the scrollbar always visible on mobile views also. If that post helped you out. Then answer my post by helping to implement that what has worked for you a month ago. Commented Nov 18, 2018 at 14:59
  • Read carefully: this is for mobile -webkit-overflow-scrolling: touch Commented Nov 18, 2018 at 18:27

1 Answer 1

0

Apple made the conscious decision to HIDE scrollbars in iOS at the system level until there's an interaction. Mac OS (including Safari) and Android quickly followed that decision.

To the best of my knowledge, only the end user can override this setting and its system global.

The suggestion of finding a library to rebuild the scrollbars as discussed in How do I get scrollbars to show in Mobile Safari remains the best solution.

That said, I would have a VERY GOOD REASON before trying to force scrollbars on mobile devices. Users are trained not to need them and they take up pointless space on an already small screen.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.