Categories CSS How to hide the scroll bar if not needed with CSS? Post author By John Au-Yeung Post date February 13, 2023 No Comments on How to hide the scroll bar if not needed with CSS? Spread the love To hide the scroll bar if not needed with CSS, we set the overflow-y property. For instance, we write div { overflow-y: auto; } to only show the vertical scrollbar only when needed with overflow-y: auto;. Related Posts How to hide scroll bar, but while still being able to scroll with CSS?Sometimes, we want to hide scroll bar, but while still being able to scroll with… How to allow scroll but hide scrollbar with CSS?Sometimes, we want to allow scroll but hide scrollbar with CSS. In this article, we'll… How to get scroll bar width using JavaScript?Sometimes, we want to get scroll bar width using JavaScript. In this article, we'll look… By John Au-Yeung Web developer specializing in React, Vue, and front end development. View Archive → ← How to turn off word wrapping in CSS? → How to add multiple classes to a ReactJS Component? Leave a Reply Cancel replyYour email address will not be published. Required fields are marked *Comment * Name * Email * Website Save my name, email, and website in this browser for the next time I comment. Current ye@r * Leave this field empty