Is there a way to never have a scrollbar on a div?

I have a div, which, depending on the circumstances, may overflow. Is there any way that no matter how much data there is in a div, it will not have a scroll bar? I was hoping there would be a style that I could just add:

<div style="width:100; height:100; noscroll:true" >

Is there such a thing?

+4
source share
1 answer

Yes, you can use overflow: hidden;, and it will never show the scroll bar. Please note that this may also disable scrolling (even with the mouse wheel) in some browsers.

overflow-x: hidden; overflow-y: hidden; .

+6

Source: https://habr.com/ru/post/1540736/


All Articles