I have a CSS layout that positions a div both horizontally and vertically relative to the window. It works well, but when I scroll down the page, the div stays centered as if the page hadn't moved.
width:600px;
height:300px;
position:absolute;
left:50%;
top:50%;
margin:-150px 0 0 -300px;
z-index:99;
Is there a way to achieve this using just CSS?