We sought to examine the joint and independent contributions of working conditions and health-related behaviours in explaining social gradients in self-rated health (SRH). Nationally representative cross-sectional data from the Swiss Health Survey of 2007 were used for this study. Bi- and multivariate statistical analyses were carried out on a sample of 6950 adult employees of working age. We examined a comprehensive set of five health behaviours and lifestyle factors as well as twelve physical and psychosocial work factors as potential mediators of the relationship between social status and SRH. Analyses were stratified by sex and performed using two measures of social status, educational level and occupational position. Strong social gradients were found for SRH, but mainly in men whereas in women the associations were either not linear (educational level) or not statistically significant (occupational position). Social gradients were also found for most lifestyle and all physical and psychosocial work factors studied. These three groups of factors equally contributed to and largely accounted for the social gradients in SRH although not all of the individual factors turned out to be independent and significant risk factors for poor SRH. Such risk factors included physical inactivity and obesity, poor posture and no or low social support at work (both sexes), heavy smoking (men) and underweight, overweight, uniform arm or hand movements at work, monotonous work and job insecurity (women). In conclusion, social inequalities (or more precisely educational and occupational status differences) in SRH were more pronounced in men and can be attributed for the most part to a sedentary lifestyle and to a physically demanding and socially unsupportive and insecure work environment. Apart from this main finding and overall pattern, sex-specific risk profiles were observed with regard to SRH and need to be taken into consideration.