Galileo thermometers (or Gallimeters) consist of a glass cylinder filled with a liquid. Within the liquid are several hollow glass spheres called cruets, which are also filled with liquid. The cruets have tags that indicate a specific temperature. Depending on the exterior temperature, the cruets either float, remain suspended, or sink; the lowest suspended cruet indicates the current exterior temperature.

            -----
            |o o|
            | oo|
            |o  |
            |  o| <-- Indicates temperature
            |   |
            |   |
            |   |
            | oo|
            |ooo|
            -----

The Galileo thermometer is named after Galileo Galilei (of course), who discovered that the density of a liquid changes with temperature. These devices have been made since the end of the 17th century. Early manufacturing was difficult since the density of the cruets has to be controlled very accurately for proper temperature measurements.

The workings of the Galileo thermometer are as follows. The cylinder is filled with a liquid with a density that changes considerably with changing temperature (nowadays water can be used, but probably an alcohol was used in older models). The cruets are made of glass, and have different average densities (total mass of cruet and content over the total volume of the cruet). The colored liquid filling serves to set the correct weight; any type of liquid or solid can be used for this, but this also serves a cosmetic role.

The densities of the cruets are comparable to the density of the surrounding liquid in the temperature range that needs to be measured. When the device is in thermodynamic equilibrium with its surroundings, the lowest suspended cruet will indicate the temperature. At very low temperatures, the density of the liquid increases, and all the cruets float. At very high temperatures, the density of the liquid decreases, and all the cruets will sink. At intermediate temperatures, some cruets will float, and some cruets will sink.

So why don't the cruets change their density, just as the surrounding liquid? Indeed, the temperature of the cruets follows that of the liquid. Since the cruets are made of glass that expands or contracts little with changing temperature, the volume of the cruets won't change much. Therefore, the average density of the cruets will remain relatively constant over the temperature range of the thermometer.