I have this div:

<div style="overflow:scroll; width:400px;height:400px;">here is some text</div>

The scrollbars are always visible, even though the text does not overflow. I want to make the scrollbars only be visible when necessary – that is, only visible when there is enough text in the box that they are needed. Like a textarea does. How do I do this? Or is my only option to style a textarea so it looks like a div?

8 Answers
8

Leave a Reply

Your email address will not be published. Required fields are marked *