Sometimes, we want to prevent the scroll bar from adding up to the width of a page on Chrome with CSS.
In this article, we’ll look at how to prevent the scroll bar from adding up to the width of a page on Chrome with CSS.
How to prevent the scroll bar from adding up to the width of a page on Chrome with CSS?
To prevent the scroll bar from adding up to the width of a page on Chrome with CSS, we set the overflow
property.
For instance, we write
.yourContent {
overflow-y: overlay;
}
to set the overflow-y
property to overlay
to stop vertical scroll bars from adding up to the width of a page on Chrome.
Conclusion
To prevent the scroll bar from adding up to the width of a page on Chrome with CSS, we set the overflow
property.