I have a cart div for my webshop that sticks to the screen when you scroll down. I'm using the solution from this page - the answer that has the most vote up's, not the accepted answer: How can I make a div stick to the top of the screen once it's been scrolled to?
When the visitor adds many items, the cart gets taller than the browser window, and some items disappear below the browser. I want to add a scroll bar to the div using overflow-y: scroll, but the problem is that, even if the div is taller than the screen, the browser still thinks the user can see the whole div, so the scroll bar doesn't get enabled.
Can I somehow make the div understand that it shouldn't grow beyond the screen, and activate the scroll bar instead?
Thanks!