Skip to content Skip to sidebar Skip to footer

Scrollbar In Div Scroll Instead Of Page Scrollbar

I was building my site I can came across a little problem. I have a div with a fixed height and overflow:auto;. The height of the website will adjust itself to fit the page perfect

Solution 1:

This should work, I have used it in the past:

div {
        width:150px;
        height:150px;
        overflow:scroll;
    }

Solution 2:

Here's an example of a possible solution:

http://jsfiddle.net/TTXqQ/

I'm using the Mousewheel Plugin

Solution 3:

I believe the only way to do this is by fixing the content of everything else on the page and positioning your div such that it is in the "window" framed by the fixed content. If you can post your HTML, we may be able to help more.

Post a Comment for "Scrollbar In Div Scroll Instead Of Page Scrollbar"