Catered for scrollTop when determining inline position
Minified version