Change height calculation and location based on scrollbar changes