Skip to content Skip to sidebar Skip to footer

How To Hide The Scroll Bar And With The Content Ramaining Scrollable?

I want to print my html page into a PDF file, but don't want the scroll bar showing there in the PDF file. And my page have a scrollable body, so if I set this: * { overflow: hi

Solution 1:

There is a CSS rule that can hide scrollbars in Webkit-based browsers (Chrome and Safari). That rule is:

.element::-webkit-scrollbar { width: 0!important }

There is a CSS rule that can hide scrollbars in IE 10+. That rule is:

.element { -ms-overflow-style: none; }

There used to be a CSS rule that could hide scrollbars in Firefox, but it has since been deprecated. That rule was:

.element { overflow: -moz-scrollbars-none; }

Solution 2:

You can set display of scrollbar to none by:

::-webkit-scrollbar {
    display: none;
}

This will hide all the scrollbars without disabling scrolling.

Edit: this only works on chrome, for a better explanation you can check this answer Hidding Scrollbar

Post a Comment for "How To Hide The Scroll Bar And With The Content Ramaining Scrollable?"