I think you mixed up the order of your experiment.
if you fill a bottle to the brim with water and then add ice, the ice will displace the same volume of water, which will overflow. You then close the lid. When the ice melts it will take up less space than the water, so the volume of liquid in the bottle will be less, and there will be a bit of a vacuum created.
Latest Answers