Forum Moderators: open

Message Too Old, No Replies

A script to stop scrolling at a certain point?

         

dickbaker

10:17 pm on Jan 14, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a site with the usual layout: site banner at the top, navigation menu on the left, text to the right of the navigation menu, and then a large black box below the text. The black box contains a copyright disclaimer, and also plain text links to sections of the site.

Because many of the pages are dynamic, and I have no control over how much text my subscribers put on their pages, that black box "floats."

I don't want people to scroll down and see the bottom of the black box, while the gray box from the navigation menu keeps on going, or vice versa. So, I have both of them extending down for about 5,000 pixels. I figure that people aren't going to keep scrolling if there's nothing there.

But I do hear some complaints about it, nonetheless.

So, is there a script to stop scrolling at a certain point? For example, right after the text links in the black box?

Thanks much for any replies.

adni18

12:28 am on Jan 15, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can access the position of the black box using offsetTop and offsetLeft, then add offsetHeight and offsetWidth to those variables, add about 20px padding, then end whatever elements you want to there.

dickbaker

10:22 pm on Jan 15, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



adni18, I know almost nothing about javascript, so what you just wrote is completely over my head.

If you have the time, and if it's not too much trouble, could you post an example?

Thanks,
Dick

adni18

3:39 am on Feb 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you still need help with this, sticky me.

orion_rus

10:11 am on Feb 26, 2005 (gmt 0)

10+ Year Member



dickbaker you are scrolling a window or a container like div?