Individuals consistently differ in behaviour, exhibiting so-called personalities. In many species, individuals differ also in their cognitive abilities. When personalities and cognitive abilities occur in distinct combinations, they can be described as 'cognitive styles'. Both empirical and theoretical investigations produced contradicting or mixed results regarding the complex interplay between cognitive styles and environmental conditions. Here we use individual based simulations to show that, under just slightly different environmental conditions, different cognitive styles exist and under a variety of conditions, can also co-exist. Co-existences are based on individual specialization on different resources, or, more generally speaking, on individuals adopting different niches or microhabitats. The results presented here suggest that in many species, individuals of the same population may adopt different cognitive styles. Thereby the present study may help to explain the variety of styles described in previous studies and why different, sometimes contradicting, results have been found under similar conditions.