Solids have very small intermolecular space and when heated, do not expand as per the container volume. Basically, their expansion is not good.
Liquids, on the other hand, have a definite volume and their expansion is ideal. Also, they fill the container only to the desired level, unlike gases.