add margin when calculating scroll bounds