updates scrolling to take into effect padding