We present an experimental method aimed at measuring mass densities of solids at ambient pressure. The principle of the method is flotation in a mixture of liquid nitrogen and liquid argon, where the mixing ratio is varied until the solid hovers in the liquid mixture. The temperature of such mixtures is in the range of 77-87 K, and therefore, the main advantage of the method is the possibility of determining densities of solid samples, which are instable above 90 K. The accessible density range (~0.81-1.40 g cm(-3)) is perfectly suitable for the study of crystalline ice polymorphs and amorphous ices. As a benchmark, we here determine densities of crystalline polymorphs (ices I(h), I(c), II, IV, V, VI, IX, and XII) by flotation and compare them with crystallographic densities. The reproducibility of the method is about ±0.005 g cm(-3), and in general, the agreement with crystallographic densities is very good. Furthermore, we show measurements on a range of amorphous ice samples and correlate the density with the d spacing of the first broad halo peak in diffraction experiments. Finally, we discuss the influence of microstructure, in particular voids, on the density for the case of hyperquenched glassy water and cubic ice samples prepared by deposition of micrometer-sized liquid droplets.