Canalization describes the process by which phenotypic variation is reduced by developmental mechanisms. A trait can be canalized against environmental or genetic perturbations. Stabilizing selelction should favor improved canalization, and the degree of a trait's canalization should be positively correlated with its impact on fitness. Here we report, for Drosophila melanogaster, measurements of environmental canalization for five fitness components. We compare them with measurements of genetic canalization, and we discuss the impact of inbreeding on both. In three experiments we measured the variation of fitness components within lines nested within temperature, treatment, and experiment. Lines differed in the position of a P element insert or in genetic background. Within lines flies were genetically nearly identical. We designated trait variation within lines as environmental canalization. The canalization of the traits increased with their impact on fitness, and the pattern was similar to that found for the canalization of fitness components against genetic differences, measured as the variation among lines nested within temperature, treatment, and experiment. This suggests that developmental mechanisms buffer the phenotype against both genetic and environmental disturbance. The results also suggest, less strongly, that inbreeding weakens canalization.