How to make Div vertical scrollbar show with CSS?

Spread the love

To make Div vertical scrollbar show with CSS, we set the overflow-y attribute.

For instance, we write

<div style="width: 200px; height: 100px; overflow-y: scroll">test</div>

to add overflow-y: scroll to always show the vertical scrollbar on the div.

Leave a Reply

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