4

The vertical scroll bar in textarea is displaying in I.E,FF and Chrome but not in i-os devices like ipod/ipad.

<textarea  id="termsConditions" cols="30" rows="5" readonly="readonly">Sample text sample           text sample text sample text sample text sample text sample text sample text sample text sample text sample text sample text sample text sample text sample text sample text sample text sample text sample</textarea>

How to resolve this problem?

Thanks a lot in advance.

Dukhabandhu Sahoo
  • 1,394
  • 1
  • 22
  • 44

2 Answers2

6

Just as Michael Halpin has said. Add -webkit-overflow-scrolling: touch into your styles.

HTML

<textarea  id="termsConditions" cols="30" rows="5" readonly="readonly">Sample text sample           text sample text sample text sample text sample text sample text sample text sample text sample text sample text sample text sample text sample text sample text sample text sample text sample text sample</textarea>

CSS

#termsConditions {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}​

DEMO

Michael
  • 9,639
  • 3
  • 64
  • 69
yckart
  • 32,460
  • 9
  • 122
  • 129
0

it Is worked for me

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

Hope this works for you

Debabrata
  • 124
  • 1
  • 10
Thomas Mathew
  • 235
  • 2
  • 9