Sex ratios of giraffe groups differ in different habitats, with open vegetation having female‐biased groups, and tall, thick vegetation having male‐biased groups. On a ranch in south‐central Kenya, we quantified habitat differences of male and female giraffe groups and showed that the preference for open habitats by female groups was limited to groups with young. We suggest that this difference is due to the avoidance of predators of young giraffes. We also showed that rates of giraffe feeding peaked at intermediate feeding heights equal to approximately 60% of adult giraffe height. In the dense habitats with a variety of tree heights used by male groups and female groups without young, both male and female giraffes fed most at heights where they could feed fastest. However, in the open habitats used by female groups with young, females fed mostly at heights below optimum because these habitats are dominated by short food plants. On the other hand, the dominant males accompanying these female groups fed at heights above optimum on rare tall trees, possibly to increase intrasexual vigilance. Apparently, both male and female giraffes sometimes forfeit feeding efficiency for short‐term reproductive gains.