I have read this question:
For x-rays the (HUP limit) Δx becomes smaller than the distances between the lattice distances of atoms and molecules, and the photon will interact only if it meets them on its path, because most of the volume is empty of targets for the x-ray wavelengths of the photon.
Why do X-rays go through things?
As far as I understand, X-rays are one of the most penetrating electromagnetic radiation. They should easily penetrate Earth's atmosphere just like visible light. Then why do all x-ray telescopes have to be in space?
The image is from the DK Smithsonian Encyclopedia.
The only thing I found about this says something about atmospheric absorption, but does not go into detail, why x-rays get absorbed more then any other wavelength (like visible).
So basically I am asking why are x-rays one of the most penetrating in solids, but one of the least penetrating in gases?