Scroll top when not at top

If the containing element isnt at the top of the page then we need to
take that into consideration when dealing with the scrolltop value for
calculating the padding.