js solution to position absolute problems with scrolling