I have a div with let's say a height on 400px. The content is much longer, so the div can scroll (y-axis). In the right side of the div, I need some buttons to have a fixed position inside that div.
How would I do that? jQuery, CSS, whatever - I don't mind.
I tried fixTo - but doesn't seem to work for this - and a CSS solution that says "use position:fixed, but no left/right - just margin". It works OK, but if the page itself scrolles, the buttons scrolls too - which they shouldn't. They should stay fixed inside the div at all time.
Example code:
<div class="container" style="width: 960px; height: 400px; position: relative;">
<div class="buttons needToBeFixed"></div>
<div class="aLotOfContent" style="width: 2000px;"></div>
</div>