Jump to content

Element absolute positioning only between y-axis point 1 to y-axis point 2


boo_lolly

Recommended Posts

This is a bit tough to explain without screenshots. I need a div element to stay at the bottom of the user's browser screen as they scroll down the page, but once the div element has reached the bottom of its container element, the inside (footer) div should stop and stay there while allow the user scrolls down to view the rest of the page. Also, if the user is scrolling all the way up, then as soon as the inside (footer) element hits the bottom of the user's browser, it will stay at the bottom of the browser until it reaches the top of its container element, there it will stop and the user can continue to browse toward the top of the page.

 

An example of this can be seen at http://www.mininova.org/  Look to the right at the advertisement. As you scroll down, it follows, then when you get close to the bottom of the page, it stops before you scroll all the way to the bottom. I want the same effect, except I want the element will be horizontal, and in the middle of the page. Can anyone help me with this effect?

 

From the research i've done it looks like it's a combination of relative and fixed positioning.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.