mon_pacey8
asked on
How to control the scrollbar x and y position in html using javascript or css
How to control the scrollbar x and y position in html using javascript or css
ASKER
Hi joebednarz, can you give me some examples using that DIV to move the scrollbar. Im still new in web programming. thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi joebednarz, how about if I wanted to remove some upper part of the page like from your example I dont want to see the 1 to 4. Only the 5 to 10 as your example above
So, you want to still have the HTML print out all values, but only show the last 5... essentially hiding the first four values?
Well, I know you can set "overflow: none" and it will simply display what it can in the scrolling DIV... which portion it shows, I'm not really sure. You could at that point, use some javascript to make the current position the bottom of the DIV... kind of a forced scroll...
Hope I understood your question correctly...
Well, I know you can set "overflow: none" and it will simply display what it can in the scrolling DIV... which portion it shows, I'm not really sure. You could at that point, use some javascript to make the current position the bottom of the DIV... kind of a forced scroll...
Hope I understood your question correctly...
http://www.xulplanet.com/references/elemref/ref_StyleProperties.html
Otherwise, I think all you can really do with scrollbars (common to all browsers) is:
scrollbar-face-color
scrollbar-arrow-color
scrollbar-base-color
scrollbar-shadow-color
scrollbar-dark-shadow-colo
scrollbar-highlight-color
scrollbar-3d-light-color
Now, if you are trying to "move" the scrollbar for the entire page, I'd try a different approach... I'd create a DIV around the area you want to scroll (whole page, use a DIV that is x-pixels wide, etc) and set the "overflow: scroll;" on the DIV.