开发者

limiting scroll issue

开发者 https://www.devze.com 2023-02-21 13:29 出处:网络
Hey, I have a small issue, which I posted here before, but apparently the solution I got only fixed half the problem.I n开发者_高级运维eed to limit the scroll bar, to only appear once the window is re

Hey, I have a small issue, which I posted here before, but apparently the solution I got only fixed half the problem. I n开发者_高级运维eed to limit the scroll bar, to only appear once the window is resized to a width of 848px, which was resolved with CSS media queries. My problem now, is that once the scrollbar appears, it enables scrolling to a larger area than I want. It allows you to scroll right, all the way to the edge of the furthest element. I want the scrolling to only be allowed inside that same 848px. I'm sure this is an easy fix, but I can't get it. Much thanks in advance.

Check out the example at http://brianbattenfeld.com/fingers


I might be a little confused about what your tying to do but... you could turn off the tell the element to only scroll vertically with CSS.

#element{
    width: 200px;
    height: 300px;
    overflow-x: hidden;
    overflow-y: scroll;    
}
0

精彩评论

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