CHICAGO -- Pitch by pitch, Greg Maddux delivered the message: At 39, he's still effective.
"When he gets a feel for his pitches, he's awesome," teammate Todd Walker said.
Maddux (7-4) scattered five hits in six innings, struck out six and did not walk a batter. With his 312th win, he moved past Tom Seaver into sole possession of 17th place on the career list.
"We've got a lot of time left," Maddux said. "We're over .500. We need to get 20 games over to have a legitimate shot at the postseason. ... The Astros came from a lot further back last year."
Jose Contreras (3-4) allowed six runs, eight hits, two wild pitches and a career-high three hit batters in 6 1/3 innings.
After Corey Patterson led off the game with a bunt single, Contreras hit Neifi Perez and, with one out, threw a wild pitch before a walk to Jeromy Burnitz loaded the bases. Ramirez turned on a hanging slider.
"One bad pitch basically was the difference in the game," White Sox catcher A.J. Pierzynski said.
Ramirez's slam was his first since July 22 last year against Cincinnati. His 17th homer of the season also extended his hitting streak to 12 games.
"It felt pretty good," said Ramirez, who turned 27 on Saturday.
Everett led off the second with his 11th homer. Dye followed with his 15th homer, cutting the Cubs' lead to 4-2. It was the fifth time this season the White Sox hit consecutive homers.
After Perez booted Pierzynski's slow roller to shortstop, Hollandsworth preserved the lead by robbing Crede.
"It was a good one to rob," Burnitz said. "It was perfect for him -- a couple feet over the fence and a nice high one that he had a chance to jump up for."
Maddux found his rhythm and stifled the White Sox. He struck out Pablo Ozuna and got Podsednik to end the inning.
"It stopped the bleeding," Maddux said of Hollandsworth's catch. "It was a big play, and Aramis was a big play, too, coming out hacking. He found himself a pitch and hit it hard."
Maddux is 5-1 in his last six starts.
"Maddux threw a tremendous game," White Sox manager Ozzie Guillen said. "We couldn't do much on the bases because we didn't have that many people on the bases."
Maddux hit all corners of the strike zone, which he has done throughout his career.
"Today, we had every reason in the world to feel down about ourselves and Greg picked us up," Walker said.
- The Cubs optioned RHP Todd Wellemeyer to Triple-A Iowa and recalled RHP Roberto Novoa before Saturday's game. This will be the third stint this season with the Cubs for Novoa, who is 1-1 with a 4.50 ERA in eight relief appearances. Wellemeyer, who allowed five runs 2 1/3 innings of relief Friday, was 2-1 with a 4.74 ERA in two stints with the Cubs.
- Maddux needs two wins to tie Gaylord Perry for 16th place.
- Ozuna started his fifth straight game at shortstop for the White Sox, with Juan Uribe nursing a sore back.
- The back-to-back homers by Everett and Dye were the first for the White Sox since June 8, when Crede and Frank Thomas hit consecutive shots against Colorado.