I have a table with a fixed height and overflow set to auto so a vertical scroll bar appears. But when you scroll to the bottom of the table it starts scrolling the entire page. How can I prevent this when the mouse is inside the table?
@arc4nisOct 26.2008 — #As far as I know there is no way to prevent this with HTML/CSS, but I think you can do this with javascript, you would have to make an event that happens lets say every 0.1 sec, I'm sorry but I dont have the time to write a working javascript code so maybe this pseudocode may help you:
var position=0;
function eventevery0.1sec()
{
if (the mouse is inside the table)
{
set scrollbar_position=position;
position=scrollbar_position;
}
}
but still if you manage to write a script like this it wont work on all browsers (thats the problem with messing around with the scrollbars).
So you need to ask yourself, do you really need to do this or can your webpage work without this?