I am installing a new sink/vanity in a older house. The drain pipe for the sink is down through the floor (as is the water supply lines) and not in the wall. When I position the new vanity, do I need to offset the sink drain from the floor drain pipe to connect a "P" trap or is there a way to line up the drain and use some sort of special P trap that is designed for floor draining?
Before installing your vanities, have a plumber rule out that you have a functional (or not) drum trap under your floor. Drum traps are no longer to Code but that's because they can clog; not because they're a safety issue. No, it does not have to be replaced unless pipe connected to it is replaced.
If you do have a functional (clean and clear of debris) drum vent no offset is required and you don't have to worry about the following:
The maximum distance of a tail piece (vertical drop from drain hole) before reaching P-trap is 24" per IRC 3201.6.
Also, you need to determine how this drain line is vented and where that vent is in relationship to the drain hole. The issue is velocity of the water and the total length of the drain before the potential of a vacuum is relieved via venting.