Update the block position when resize the page