The Shettles method, devised by Dr. Landrum Shettles, is based on the fact that Y sperm (for boys) are smaller, faster, and less resilient than X sperm (for girls), and are less able to withstand an acidic environment in the vagina.
The Whelan method, devised by Dr. Elizabeth Whelan, suggests that having sex earlier on in the cycle, some four to six days before ovulation, is more likely to result in a boy. Sex nearer the time of ovulation is more likely to result in a girl. Curiously, the Whelan way is more or less the opposite of the advice given by Shettles.
But what works? The mainstream medical view, supported by reports in journals such as the New England Journal of Medicine, is that the timing of sex has little or no bearing on gender. The possible exception is that having sex two days before ovulation may be slightly more likely to favor a girl.