Although sex is determined by the parents\’ chromosomes, some research suggests that diet may affect the odds of having a boy or girl to some extent. The following are some dietary suggestions that men can try before pregnancy: 1. Eat more foods rich in zinc: Zinc is a kind of food that is good for men.