That sounds like a problem with the positioning (duh :)). How do the code look like? Where are the buttons placed within the page? I think for it to be correct, the buttons should have position: absolute or position:relative, and their parent, which should be the div with the folders or some other div within that one (the one that is scrolling), also need to have position:relative so that the buttons know which div to follow.
Seeing that the background of the buttons follow the scrolling, first thing to try would be to set that one to position:relative.
I hope I made myself somewhat clear, in a bit of a hurry, but hopefully it will give you some idea of what to look for.