Make a div keep with the user as they scroll

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
Skara
Forum Regular
Posts: 703
Joined: Sat Mar 12, 2005 7:13 pm
Location: US

Make a div keep with the user as they scroll

Post by Skara »

Ok, I don't know much javascript. I don't normally need it. So.

I have a portfolio page that scrolls horizontally.
I have a 'back' button and an unobtrusive copyright that I want to scroll with the user.

So.. As the user scrolls the page right, the div keeps with them on the left of the page.

That make sense?

I don't need anything fancy, I just want to know how to make the div move. For the life of me, I can't find anything on google. Everything I can find is some big fancy menu thing.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

I think it has something to do with position: fixed and a top: <somevalue> and left: <somevalue> in your CSS.
Post Reply