How to disable vertical scroll bar on div overflow: auto with CSS?

Spread the love

Sometimes, we want to disable vertical scroll bar on div overflow: auto with CSS.

In this article, we’ll look at how to disable vertical scroll bar on div overflow: auto with CSS.

How to disable vertical scroll bar on div overflow: auto with CSS?

To disable vertical scroll bar on div overflow: auto with CSS, we set the overflow-y property.

For instance, we write

div {
  overflow-y: hidden;
}

to use overflow-y: hidden; to hide the vertical scrollbar on the div.

Conclusion

To disable vertical scroll bar on div overflow: auto with CSS, we set the overflow-y property.

Leave a Reply

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