Dodgers beat Giants but are held to no gain in wild-card race The next time the Dodgers lose, they will be officially eliminated from postseason contention. Another victory by the St. Louis Cardinals would produce the same outcome. But this dreary forecast didn't affect how the Dodgers celebrated their a 3-2 walk-off victory over the San Francisco Giants on Monday night. The win was the Dodgers' sixth in a row. A.J. Ellis tackled Elian Herrera, who pushed in the deciding run in the ninth inning by lining a single off the glove of second baseman Marco Scutaro. Players stormed out of the dugout and rushed to join the on-field celebration. Nick Punto did what he is known to do in these situations, which is to tear off the jersey of the walk-off hero. The Dodgers behaved like a team that had clinched a playoff berth and not a team that could be less than 24 hours from looking ahead to next season. "Well, it's not over with," Ellis said. We're still in this. Barely. With only two games left, the Dodgers remain two games back of the Cardinals for the second of two National League wild-card spots. The Cardinals beat the Cincinnati Reds, 4-2, earlier in the day to reduce their magic number to one. The best-case scenario for the Dodgers at this point is a one-game playoff on Thursday against Cardinals. For that to happen, the Dodgers would have to win their two remaining games against the Giants and the Cardinals would have to lose their two remaining games against the Cincinnati Reds. That play-in game against the Cardinals would determine the participant in the play-in game against the first wild-card team, the Atlanta Braves. Ellis took comfort in knowing the Cardinals were playing a team with something at stake. The Reds can be the NL's top-seeded team in the playoffs. Of the Cardinals, Ellis said, "They're still playing a strong team that's playing for home-field advantage in the playoffs and a bitter rival, at that. It's definitely not over. Meanwhile, the Giants have nothing on the line. They clinched the NL West title more than a week ago and are already locked into the league's No. 3 seeding in the playoffs. Manager Bruce Bochy fielded his regular lineup Monday, but had starting pitcher Matt Cain on a 75-pitch limit. Cain is scheduled to start Saturday in the first game of the NL division series. Before departing, Cain served up a towering two-run home run to Andre Ethier that put the Dodgers ahead, 2-1, in the fourth inning. Cain threw 68 pitches over five innings, limiting the Dodgers to two runs and four hits over that span. The Giants ace was outdone by Dodgers right-hander Aaron Harang, who held the Giants to one run and two hits over six innings. But the Dodgers squandered some opportunities to extend their lead. They had men on second and third in the fifth inning, only for Mark Ellis to ground out weakly to first base. Shane Victorino singled to left with men on first and second an inning later, but Adrian Gonzalez was thrown out at the plate by Xavier Nady for the final out. The Giants pulled even in the eighth inning. Kenley Jansen served up a one-out double to Angel Pagan, who scored on a single to left by Scutaro. The Dodgers' ninth-inning push started with a single to center by Hanley Ramirez off Santiago Casilla. Ramirez moved into scoring position on a sacrifice bunt by Victorino and reached third on a single by Luis Cruz. A.J. Ellis was intentionally walked to load the bases for Herrera. Herrera lined the ball at Scutaro, who couldn't hold onto it. "I thought he was going to catch it," Herrera said.