malihu / malihu-custom-scrollbar-plugin

Highly customizable custom scrollbar jQuery plugin, featuring vertical/horizontal scrollbars, scrolling momentum, mouse-wheel, keyboard and touch support etc.
http://manos.malihu.gr/jquery-custom-content-scroller
MIT License
4.11k stars 1.51k forks source link

Unwanted Horizontal Scrollbar in mCustomScrollbar if Element is 100 Percent Width #641

Open sureshpandiyan opened 4 years ago

sureshpandiyan commented 4 years ago

Hi Malihu,

We are getting unwanted horizontal scrollbar if element is 100% width. If it is fixed width we did not get horizontal scrollbar until necessary. Is there any solution to fix this?

<div class="CustomScrollDiv">
<!-- some content will goes here -->
</div>
<script>
$(document).ready(function () {
            $('.ir_filterTopWrap').mCustomScrollbar({
                axis: "yx",
                scrollInertia: 0,
                mouseWheel: { scrollAmount: 60 }
            });
});
</script>
<style>
.ir_filterTopWrap {
    height: 217px;
    overflow: auto;
}
</style>