my page is 2x the height of the screen (size varies depending on other item on the page). i want to show an absolutely positioned SPAN in the middle of the screen regardless of scroll position.
i apply the following style on button click, however if i scroll all the way down, the element shows up at the very top of the page since it counts the 50% from the top of the entire page.
.Centered
{
width:100%;
position:absolute;
top:50%;
left:45%;
}
how do i position the element in the middle of the page based on the scroll potion at the time of a button click?
Thank you.