Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Web Technology by (20.3k points)

I have an HTML textarea that is of fixed width, but variable height. I would like to set overflow: scroll and be able to show a vertical scrollbar, but not a horizontal one. I am not able to use overflow: auto due to other things specific to my situation.

I know there is no way of using CSS2 to show only vertical but not horizontal scrollbars. Is there anything I can do with JavaScript to hide the horizontal scrollbar?

1 Answer

0 votes
by (40.7k points)

If you are using css then do something like this:

overflow-y: scroll;

overflow-x: hidden;

Related questions

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...