开发者

Scrollbar for contentplaceholder

开发者 https://www.devze.com 2023-03-20 20:41 出处:网络
how to make the scrollbar of the hole page affect only on ConentPlaceHolder , i usestyle=\" overflow:scroll; height: 500px;\" but it makes a special scrollbar for Conentplaceholder 开发者_运维技巧but

how to make the scrollbar of the hole page affect only on ConentPlaceHolder , i use style=" overflow:scroll; height: 500px;" but it makes a special scrollbar for Conentplaceholder 开发者_运维技巧but i want the main scrollbar to do this effect .


As far as I know, the best way to do it will be to use position:fixed on all your non-scrolling elements, and then just let the page flow normally. This way, the main scrollbar will scroll the content while the rest of the page appears not to move, giving the desired effect.


Here is a jsfiddle of Dereleased's suggestion: http://jsfiddle.net/sQmhY/2/

Note that the padding of the #content div is the same as the heights of the #header and #footer divs.


Demo scroll bar demo Documentation

0

精彩评论

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