update image centering issue when window width changes