|
How can I make the <body> scrollbar sync with my... -
December 31st, 2007
...div's scroll bar with javascript? I have a problem with my layout where (in lower resolutions), when the user scrolls the scrolling bar for my overflowing DIV, the user will not get to view all of the body page without having TWO vertical scrollbars. I tried doing it so that scrolls are hidden for the body (CSS), but then the bottom of the page is cut-off, a long with some of the bottom of the DIV as well. The way my page is set up mimics an "iframe" at the middle of the page, but it isn't. CSS fixed positioning will not work with my layout.
I would like to know how could I make it so that, with javascript, the user can use the body scrollbar to scroll both the page and the div at the same time, and when the bottom of the page is reached, the div's contents would keep scrolling (since the content exceeds the page).
Anyone knows of a good solution for this? Or any worth while scrolling manipulations?
Two vertical scrollbars is one of those annoyences that really need to be avoied, but I am stuck at the moment.
I am happy with Dreamweaver... And scroll sync can be done, I just don't know how, or how to apply it to this case. The page is only a nightmare due to the number of extra scrolling, and what would fix is modifying the layout, which is what the owner does not want to do, all I need is a walkthrough on how to sync my content div to the page. This is just for the 800 by 600 users.
Also, I will accept helpfull resources that will apply to THIS layout and THIS problem. Thanks again.
Another helpfull detail for anyone reading this who may not understand what I am trying to do by being able to apply such feature: I'll visually hide one of the scrolls, so it only looks like one scroll is being used, the body/page scroll (even though what is really doing the heavy scrolling is the div content scroll). Maybe imagining that will make more sense. This "fix" is targetting the "computer illiterate" audience who visit the particular site in question...
|