Sink Trap Under Floor

I have added a pedestal sink to a first floor bathroom unfinished basement below and i need figure out where to put the trap.
Sink trap under floor. When replacing a p trap you should use the same type of trap you remove. The u shape of this pipe is the trap that retains enough water to prevent sewer gases from entering the bathroom. With your pedestal sink on the wall you can install the p trap. Traps come in 1 1 4 inch standard bathroom sink or 1 1 2 inch standard kitchen sink inside diameter sizes.
The trap must be accessible not hidden in the wall or between floor and ceiling etc but i don t see a prohibition specifically addressing the trap being under the floor. It rises vertically from the trap arm to the top of the cabinet where it makes a 180 degree turn before dropping under the floor and running horizontally to the vent stack. You can adjust the p trap sliding it up and down on the pipe that leaves the sink drain. The issue here is that the trap would be more than 24 inches.
The p trap is an important component of sink plumbing that prevents toxic sewer gases from leaking into the home. To be legal the loop must be 6 inches above the flood rim of the sink so when designing an island you need to choose a sink with overflow holes at least 6 inches below. As is stands i have a hole in the floor for directly below the sink. I have heard that s traps are illegal so the only other option is to put a p trap just below the floor accessible from the basement.
The length of the tailpiece that connects the drain to the trap depends on a.