Avogadro stated that for any ideal gas, 1 mole of particles will occupy a specific volume at a specific ratio of pressure and temperature. So why doesn't this apply to a liquid or solid?
Avogadro's law, which can be written as $V \propto n$, where $V$ is the volume of the gas and $n$ is the amount of substance of the gas (measured in moles), can be thought of as just another manifestation of the ideal gas law rewritten as follows, $$ V = (RT/p) n \, . $$ Consequently, strictly speaking, Avogadro's law is applicable only for a hypothetical ideal gas, but since real gases under usual conditions (such as standard temperature and pressure) are not far away in their properties from an ideal gas, Avogadro's law usually works well enough for them also. Substances in condensed phase on the other hand are milage away from an ideal gas in their properties, and thus, Avogadro's law is inapplicable for such cases.
To clarify in which sense Avogadro's law is inapplicable for substances in condensed phases, note that for solids and liquids, as well as for gases, the volume is proportional to the amount of substance. But Avogadro's law states not just the proportionality. It is also insists that the coefficient of the proportionality is the same for each and every gas, and this is the thing which can not be generalised to substances in condensed phases. For real gases, the ideal gas description which depends on the following assumptions (too name just a few):
- molecules are almost point-like (effectively zero-sized) particles;
- molecules do not exhibit any intermolecular forcers;
usually works as a good approximation. But for liquids and solids such a description a priori is physically horrible: molecules here are relatively bigger and more tightly packed so that their size and intermolecular interaction between them couldn't be ignored anymore.
gas molecules are small, and even largish gas molecules behave so much like small ones (example: atoms of helium vs. carbon dioxide vapor) that Avogadro's models hold very well across all the spectrum of matter in gaseous form. at a given temperature and pressure the individual molecules will have a certain statistically predictable average distance from one another.
in liquids, though the molecules are much closer together and the inter-molecular interactions--which vary widely from substance to substance--become the predominant phenomena of significance. this is why one mole of water molecules occupies 18 cubic centimeters at STP, but one mole of ethanol occupies 58.4 cubic centimeters at STP, and one mole of mercury in liquid form occupies 14.8 cubic centimeters at STP. One mole of the type of large, complex hydrocarbon molecules that make up the mixture we call "gasoline" or "petrol" may occupy around 162 cubic centimeters, if we use the specific example of 2, 3, 5 trimethylpentane.
in solids the molecules are closer yet, and we have the additional possibility of different allotropes or crystalline forms of a given solid substance which can exhibit very different physical characteristics, resulting in even further divergences from Avogadro's ideal gases, molecules of which maintain set average distances from one another at a given temperature and pressure regardless of their mass, charge, shape, etc., and which always collide with one another or with the walls of their container perfectly elastically.