I am trying to install a new toilet in a second-floor bathroom, built 1950's. The bathroom floor is ceramic tile. The cast-iron flange is connected to a 4" soil pipe. The flange is rusty and deteriorated, but seems like it will still hold new closet bolts.

The problem I'm facing is that the flange doesn't rest on the floor; there's a 1/4" gap (partially filled with some ancient, dried putty that I can scrape out) between the flange and the ceramic tile. Top of the flange is 3/4" above the floor. The toilet base has only 1/2" of depth. So when I put the new toilet on the flange, the toilet isn't resting on the ceramic tile, and it shifts and wobbles.

Should I use a bunch of shims? Try to grind down the flange with a grinder? Find another toilet -- do they vary in depth? I'm new at this.

Thanks for any help!