Chicago, which survived a wild ninth that ended with the bases loaded, won for the fifth time in seven games and opened a 1 1/2-game lead over second-place Milwaukee in the NL Central, the Cubs' largest margin since before play on Sept. 4.
St. Louis has lost eight straight for the first time since July 27 to Aug. 4 last year. The defending World Series champions, just one game out of first before play last Saturday, are six behind the Cubs, their largest division deficit since Aug. 11.
Zambrano (16-12) won his second straight start after losing five in a row. He improved to 3-0 with a 1.69 ERA against the Cardinals this season and tied his career best for wins, set in 2004 and matched last year.
Mark DeRosa's RBI single in the fourth put the Cubs ahead against Adam Wainwright (13-11), but Albert Pujols ended a 20-game, 75-at-bat homerless drought when he connected in the sixth. He hadn't hit one since Aug. 22 off Florida's Scott Olsen.
Floyd homered into the Cardinals' bullpen beyond the right-field wall leading off the seventh. While he has just eight home runs this season, he's connected in three straight games.
Pinch-hitter Daryle Ward hit a three-run double off Jason Isringhausen in the ninth for a 5-1 lead. That turned out to be key.
Jim Edmonds hit a solo homer with one out in the ninth off Ryan Dempster, and Ryan Ludwick added homered with two outs.
Yadier Molina singled, Bob Howry relieved, and Russell Branyan and So Taguchi singled to load the bases. Aaron Miles then grounded out to shortstop, giving Howry his eighth save in 12 chances.