Resize function to better keep browse button page when window height gets shorter