I am facing an issue and need some help. I am working on creating a three-column page layout where the middle section is for posts, the right section is for links and references (a bit long), and the left section is fixed.
My question is: How can I prevent the right div from moving when it reaches its bottom? Also, if the content in the middle div is shorter than the right div, how do I add a scrollbar to the page just for the right div, similar to what Twitter does?
I have been brainstorming and thought that maybe Twitter uses two separate divs for those sections. One acts normally, while the other remains fixed at the bottom. The normal one stretches the page for scrolling, while the fixed one sticks on top of it. However, I am unsure if this is the correct approach.
Is it possible to achieve this with pure CSS? (I am using TailwindCSS)
Here is my idea presented visually. (Alternatively, you can look at the Twitter homepage feed)
https://i.stack.imgur.com/zHMmO.jpg
https://i.stack.imgur.com/Sgleo.jpg
Additionally, here is a gif demonstration: