Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I create an element that doesn't turn on scrollbars?

We have floating panels that may be partially in screen. Can the window/body ignore it when it decides if scroll bar needs to show?

We do need scroll bar when other elements go outside of the window, but not this panel. So overflow:hidden on the body won't work.

like image 753
Tom Fishman Avatar asked Dec 06 '25 00:12

Tom Fishman


1 Answers

If I understand correctly you should just be able to say:

body { overflow: auto; }

If you wanted control on which access the element overflows on then try something like this:

body { overflow-x: auto; overflow-y: hidden; }

like image 179
cereallarceny Avatar answered Dec 08 '25 14:12

cereallarceny