We experimentally tested the ideal-free distribution (IFD) using oviposition sites and mates as resources. We asked whether (1) female dung flies are distributed in an ideal-free manner among various fresh dung pats (the mating site and their resource for oviposition), and whether (2) the males are distributed likewise and consequently (3) ideal-free distributed with regard to the number of females. The last prediction links the IFD to the operational sex ratio (OSR), the number of competing males per receptive female. The flies were simultaneously offered six fresh dung pats in their natural environment, arrayed in a small and a large equalsided triangle. In one experiment all dung pats were the same size, and in another the three dung pats in each triangle had different surface areas. The large and mobile yellow dung fly, Scathophaga stercoraria, was overall evenly distributed with regard to oviposition sites and mates, whereas the distribution of the smaller and less mobile Sepsis cynipsea deviated randomly from the IFD. More flies were attracted to larger pats, but not in proportion to the pat's surface area (undermatching). Based on the speed at which an IFD was approached, individuals did not appear to sample different pats. The differences between the two species in agreement with the IFD predictions are probably quantitative rather than qualitative, relating to differences in mobility and local distribution.