The difference between solid and liquid expansion, on heating the matter, has to do with intermolecular forces binding these material together. For a solid material, the constituent molecules are very tightly bound to each other by strong intermolecular forces. This is also the reason why solids have definite shape and volume. When heated, these molecules gain some kinetic energy and start moving away from each other and we get linear and volumetric expansion of materials. This is the reason, gaps are left between successive rail lengths in railway tracks. In comparison, the molecules of a liquid are not so tightly bound to each other, as compared to a solid. When heated, these weakly bound molecules start moving away from each other. Due to weaker intermolecular forces, liquids expand much more than solids, for the same rise in temperature.
Hope this helps.