is it possible to center a div vertically based on the browser screen height?
I have this
#success {
height: 300px;
top: 50%;
margin-top: -150px;
position: absolute;
}
but this centers vertically to it's parent div, and not based on the browser screen height. Is there a way where I can achieve what I want? Thanks!
Give the div position: fixed
and it will be positioned relative to the window.