Solution for the Facebook iframe application - you have an application in iFrame, when the user scrolls down, the whole page scrolls down, both facebook and iframe:
Using JavaScript, you usually position your fixed element as follows:
top = window.height() / 2 - $(id).height() / 2 left = window.width() / 2 - $(id).width() / 2
From inside an iFrame, do the following:
top = window.parent.pageYOffset + window.parent.height() / 2 - $(id).height() / 2 left = window.width() / 2 - $(id).width() / 2
source share