Reputation: 14126
I need to show a vertical scrollbar
always in a textarea
for which I put
overflow-y:scroll;
Which can then be visualized as shown below,
although the scrolling element does reflect, but I am amazed at where is the bar which needs to be as shown below. I want like this as shown in the below figure,
Just need that black bar. Any suggestions.
Upvotes: 2
Views: 5970
Reputation: 1849
Although it is not recommended, you can use padding. That way you'll always have a place to scroll to.
textarea {
height: 0px;
overflow-y:scroll;
padding-bottom: 200px; /*your height*/
}
The text will now always have padding at the bottom though, so you'll be able to scroll past the text content.
Upvotes: 5
Reputation: 175088
The small bar won't be there if you have nowhere to scroll. That's not a behavior you can change.
Tell your client/boss that their requirement is unreasonable.
Upvotes: 8