Social organisms can surmount many ecological challenges by working collectively. An impressive example of such collective behavior occurs when ants physically link together into floating 'rafts' to escape from flooded habitat. However, raft formation may represent a social dilemma, with some positions posing greater individual risks than others. Here, we investigate the position and function of different colony members, and the costs and benefits of this functional geometry in rafts of the floodplain-dwelling ant Formica selysi. By causing groups of ants to raft in the laboratory, we observe that workers are distributed throughout the raft, queens are always in the center, and 100% of brood items are placed on the base. Through a series of experiments, we show that workers and brood are extremely resistant to submersion. Both workers and brood exhibit high survival rates after they have rafted, suggesting that occupying the base of the raft is not as costly as expected. The placement of all brood on the base of one cohesive raft confers several benefits: it preserves colony integrity, takes advantage of brood buoyancy, and increases the proportion of workers that immediately recover after rafting.