Move if statement to change the contents position on the page