سؤال

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?

هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top