I’m using this CSS to postion a div horizontally and vertically to the window which works fine until you scroll down the page, then the div remains in the same centred position as if the page hadn’t been scrolled.
width:600px;
height:300px;
position:absolute;
left:50%;
top:50%;
margin:-150px 0 0 -300px;
z-index:99;
Can this be done using CSS?
Take a look at:
http://www.w3schools.com/cssref/playit.asp?filename=playcss_position&preval=fixed
position: fixed;might be what you’re looking for.