How does the Panama Canal river float?

do you mean the canal or the river itself? neither one floats. the canal is built on the riverbed and is created in such a way that it can be sealed, allowing no water through. as for the river, well it can't float on itself.