I am finishing my basement bathroom and have run in to a drain spacing issue in my vanity. The PVC coming out of the wall is 20" off the floor. The bottom of the vanity cabinet is 18" off the floor, leaving me about 2" of space between the two. Obviously, I can't have a p-trap that sits below the PVC in the wall given the lack of space in the cabinet.
What are my options in this case? Is it ok to have the p-trap site above where the water will drain in to the wall (would this mean using an s-trap -- which I think is against code)? Or, should I look to extend the PVC in the wall so it's higher up and can accept the p-trap exit at nearly parallel to the floor?
The pictures below are what's inside the wall. The red is my idea of extended the PVC up the wall a bit. The sketch is the s-trap which I think is a no go.
EDIT: 100% sure the S-trap is against code and will create a siphon. Anyone see an issue with extending the pipe in the wall as "illustrated" in my red picture?