Attach the toilet to the floor with bolts from the back wall to the closet. Measure from the wall and not from the baseboards. Measure to the nearest water supply lines. A supply line on the floor might not fit next to a toilet with a wider base.
Let's Get It Fixed!
HomeX virtual experts will assess your issue (for free!) and can resolve simple problems.