简体   繁体   中英

DIV scroll bar , not scrolling content

I have a div with it's CSS style property set to overflow:scroll. This does show a vertical and horizontal scrollbar when the content is large. Now when I click on the scroll bar it is not actually scrolling the div content. Anything wrong , please advise.

There are chances that there is another transparent element of the page which covers the scroll bar , so when you click on the scroll bar, the browser behaves as if you clicked on the transparent element.

To see if the problem comes from here, in Firefox, open Firebug and click on the blue arrow "Click an element in the page to inspect", then click on the scroll bar.

Now, if the scroll bar is not covered by anything, JavaScript is maybe blocking some events (even if I'm not sure it can block a thing like this). To test it, disable JavaScript on the page and see if it helps.

Finally, test the page in other browsers. If you are using a fancy browser, it may just be a bug in it.

尝试将CS​​S设置为:

overflow: auto;

I tried with a simple HTML page and it does do the scroll. I suspect some issue with this page. Another clue is that this DIV is encapsulated within a table element. Could this be an issue, if so how come I over come the same.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM