I would like to has a scrollable div but scrollbar should be on the right side of browser as default (but not on the right side of div). I’ve seen that on facebook (ceter div – contentArea is scrolled by right side browser scrollbar).
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The way Facebook does it is by having all the content that doesn’t scroll have a
positionoffixed. This way the native browser scrollbar will appear to scroll the center area only, while it’s actually the rest of the page that is fixed in position.A very simple example of this:
http://jsfiddle.net/tcaVN/
Now imagine the above, but with all non-scrollable items setup like the
#header.EDIT
Here is a slightly more complex example, with three columns:
http://jsfiddle.net/tcaVN/1/