Here is an example of the issue in question:
http://dev.madebysabotage.com/playground/overlay.html
You see there is a gray overlay over the entire page, but if you
Change #overlay position:absolute to position:fixed
#overlay
position:absolute
position:fixed