utilizza un if , se il box esiste stampi a video float: left se falsa stampi text-align: center;