ScrollToFixed icon indicating copy to clipboard operation
ScrollToFixed copied to clipboard

how to limit to bottom of window

Open stakeholdermap opened this issue 10 years ago • 5 comments

I am trying to get the right hand add to scroll from it's position in the page until it reaches x pixels from the bottom of the window.

I am trying bottom: x but that is moving the add out of it's place on the page. Example is here http://www.stakeholdermap.com/stakeholder-power2.html.

Thanks for any help. Tamzin

stakeholdermap avatar Jul 09 '15 20:07 stakeholdermap

See this example from the project readme: http://jsfiddle.net/y3qV5/1730.

Also, bottom and marginTop work opposite of each other. This is most likely why you are seeing strange behavior.

bigspotteddog avatar Jul 09 '15 21:07 bigspotteddog

Here is a modified version of that fiddle that, I think, matches what you are trying to accomplish:

http://jsfiddle.net/y3qV5/3347

bigspotteddog avatar Jul 09 '15 21:07 bigspotteddog

Or, this if you want to dock to the bottom:

http://jsfiddle.net/y3qV5/3348

bigspotteddog avatar Jul 09 '15 21:07 bigspotteddog

Thank you so much this looks perfect. The only problem I now have is the fixed header. #cart disappears under it.

Thanks again!

stakeholdermap avatar Jul 10 '15 12:07 stakeholdermap

I just checked out your site. Looks like you have corrected the fixed header issue. Looks good!

bigspotteddog avatar Jul 10 '15 17:07 bigspotteddog