开发者

fixed width box with scrollbar height of the full window

I'm trying to make a fixed width, fixed height box that "mimics" overflow:scroll, but the scroll bar is actually the widow scrollbar (or a pseudo-window scrollbar). What I mean by that is, the box is sitting there and you have the scroll ba开发者_JAVA百科r on the side of the browser scroll the box contents up and down. Possible with just css? If not, is there a solution with javascript?


Your box height is exceeding your window height. In following manner this could happen if you are in resolution 1024 by 768px

div style="width:400px; height:1000px; overflow:scroll;"

Solutions-

  • css- reduce height of the box

or

  • js- control height of the box [screen.Height] for different resolutions
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜