The Dodgers beat the Padres 5-2 on Tuesday in San Diego to stay 2½ games behind the San Francisco Giants in the NL West.