Why are all gamma rays shorter than x-rays?

This statement is incorrect. Gamma rays are not always shorter than x-rays. In fact, the opposite is true. X-rays have shorter wavelengths than gamma rays.

Radiation Treatment - Related Articles