开发者

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.


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.


Try to set the css as:

overflow: auto;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜