div with limited scroll, no matter the scroll position

  • alexandru25lex
  • Born
  • Born
  • alexandru25lex
  • Posts: 1

Post 3+ Months Ago

Helo.
I have two divs with some content.

The one in the left is fixed if it's smaler than the window.
The one in the right has more content and obviously has bigger height.

I want that when i scroll down, the left div scrolls until it's height, and then remain in that place while the right div scrolls all to the end of it (bottom).
And when i scroll up, the left div to scroll back to first position, and remain in that place while the right div scrolls all to top.

I hope you understand me.
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9101
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

If I am understanding correctly, you will likely need to use some sort of JavaScript to do what you want there. Basically the JavaScript would need to keep track of the scrolling positions to know the state of each one, and then from there you can write code to figure out which one to adjust when someone scrolls.
  • ScottG
  • Proficient
  • Proficient
  • ScottG
  • Posts: 477

Post 3+ Months Ago

hmmmmm This sounds familiar ... Let me search my post for a second ... Ah yes here it is website-design-forum/div-fixed-but-scrollable-kinda-t108463.html#p599079

Granted this is completely vertical and not side by side the concept is the same and like Bigwebmaster stated that you need javascript to complete this task. this is written with using jquery and uses one of their slider widgets to make a mock scroll bar. I know this isn't exactly what you are looking for but is it a good starting point to give you an idea on how to go about solving the issue

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 82 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.