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: hidden;
}
The body will be incomplete in the final pdf file. So if there is a way just prevent the scrollbar from showing but the content still scrollable?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With