Question

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

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

Is there such a thing?

Was it helpful?

Solution

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

You can specify overflow-x: hidden; for horizontal or overflow-y: hidden; for vertical scrollbars.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top