A Galileo thermometer

Density of liquids and solids usually changes with temperature in a linear way. More precisely, the density decreases with the temperature, as described by the following equation:

where B is a coefficient of thermal expansion and T0 the initial temperature. For water B is ca. 0,21·10-3 K-1, and for glass it is 0,01·10-3 K-1 - 0,03·10-3 K-1, where as for isopropyl alcohol it is : 1,1·10-3 K-1 (Isopropyl alcohol is often used in Galileo thermometers.) The lower the coefficient of thermal expansion, the smaller the change in density. The above comparison of coefficients allows to draw a conclusion that density of liquids changes considerably with the temperature, whereas glass bulbs density changes very slightly. With the rise of the temperature the liquid becomes lighter (in the same unit of volume) but glass bubbles do not and that is why they sink.

As a matter of fact the first Galileo thermometer, a container with some liquid and a thin tube resembled a present-day medical thermometer with mercury inside.
Remember that glass expands little with temperature, but it also conducts poorly the heat. So when using glass and trying to heat it, please choose glass with a very low expansion coefficient, like so-called pyrex (with the expansion coefficient really small, 0.003×10-3 K-1).