This thesis describes an investigation into the effects of habitat composition,principally the composition of algae in a wrack bed, on the life history of the seaweedfly, Coelopa frigida. The mating system of C. frigida is dominated by intense sexualconflict characterised by frequent harassment by males leading to a vigorous pre-matingstruggle. This response leads to sexual selection for large male size and sexualdimorphism. The mating behaviour of C. frigida is affected by their environment, withexposure to brown algae inducing harassment in males and oviposition in females. Despite more than two decades of research into coelopid reproduction little is knownabout how habitat composition alters the patterns and processes of sexual conflict. Studies contained in this thesis consider environmental influences that bothdirectly and indirectly influence sexual conflict. Direct effects of the environment aremeasured by conducting mating trials following culture of C. frigida on different speciesof algae and by exposing males to different species of algae. This work is accompaniedby studies of larval development and adult survival on different algae. In recent years ithas been observed that the distribution of European coelopids has undergone anorthward range shift. An investigation into the current distribution of Europeancoelopid species and a discussion of the effects of climate change that may have causedthis change is included. Finally, the use of stable isotope analysis to determine the dietof wild coelopids and alternative statistical methods to analyse mating trials aredescribed.