Scrollbar on Android Phones | XM Community
Question

Scrollbar on Android Phones

  • 21 August 2020
  • 1 reply
  • 50 views

Badge

Hello there!
In trying to sort out why the scrollbar isn't working on an android phone I came across this in the CSS stylesheet
.Android ::-webkit-scrollbar{display:none}
I have tried adding these different options into Custom CSS...
.Android ::-webkit-scrollbar{display: block !important}
-
.Android ::-webkit-scrollbar{display: inline !important}
-
.Android ::-webkit-scrollbar{display: inline, width: 20px !important}
But nothing seems to work!
Any thoughts or ideas?

Many many many thanks!
Jess


1 reply

Userlevel 7
Badge +27

Hi there, I mentioned in my other post that I was able to adapt the CSS solution in this article to get a custom scroll bar to display on Android but not on iphone. Adding the below CSS to the Style section of the survey's Look & Feel is working on my end to have a Custom Scroll Bar display on Android. This does work well with PGR also.
html {
  --scrollbarBG: #CFD8DC;
  --thumbBG: #FF0000;
}
body::-webkit-scrollbar {
  width: 11px !important;
}
body {
  scrollbar-width: thin !important;
  scrollbar-color: var(--thumbBG) var(--scrollbarBG) !important;
}
body::-webkit-scrollbar-track {
  background: var(--scrollbarBG) !important;
}
body::-webkit-scrollbar-thumb {
  background-color: var(--thumbBG) !important;
  border-radius: 6px !important;
  border: 3px solid var(--scrollbarBG) !important;
}

html {
  overflow: hidden;
}
body {
  height: 100vh;
  overflow-y: auto;
  max-width: 99%;
}
CustomScrollBar2.png

Leave a Reply