The desity of the bottle is less than the density of the water beacuse the volume of the bottle is much more than the volume of the nail and hence the bottle will float even tough it is made of metal. It is just like the case of a ship floating on the water even tough it is made of heavy metal.