In ideal gases, it's pretty clear that 1 mole of gas occupies 22.4 L at STP. By knowing this, it's easy to calculate density given molar mass. However, this isn't true for solids. If I know molar mass of a solid, I cannot derive it's density.
I want to clarify whether my understanding of why we can't derive density in case of solids is correct. For solids, since each solid has its own lattice structure, knowing how the molecules are arranged is necessary, because if there is more space between molecules, it will have a lower density, which isn't really an issue in (ideal) gases where the arrangement of molecules/atoms is uniform.