add window resize listener for centering position