U.S. stocks were mostly flat on Wednesday as strength in transportation names helped offset a downgrade of Portugal's credit rating, which pressured banking shares.

Transports ranked among the top advancers as the Dow Jones Transportation Average <.DJT> rose more than 1 percent and hit an all-time high in intraday trading. The index was led by Con-Way Inc , which gained 5.5 percent to $41.80 after

the U.S. trucking and logistics company said it was restoring some employee benefits because the economy had improved.

Other names in the transports group, which is considered a barometer for economic activity, also rose. FedEx Corp advanced 1.4 percent to $96.80 while United Parcel Services rose 1.3 percent to $74.73.

But gains were modest as a softer-than-expected survey on U.S. services sector growth, which slowed slightly in June, gave investors little reason to make big bets after last week's rally drove the S&P 500 up 5.6 percent.

Michael McGervey, president of McGervey Wealth Management in North Canton, Ohio, said the 1,345 level was serving as resistance for the S&P 500, referring to a recent high on the index, reached at the start of June.

There's new momentum in the market following last week's surge, and generally speaking, the markets have an upward bias. But until we break through 1,345, we'll be trading sideways, he said, adding that there was further upside potential if the level was breached.

The S&P 500 has been fluctuating in a range from about 1,250 to 1,350 for the last several months, with flare-ups in the euro-zone debt crisis often serving as a catalyst for profit-taking in a short-term trader's market.

The Dow Jones industrial average <.DJI> was up 40.22 points, or 0.32 percent, at 12,610.09. The Standard & Poor's 500 Index <.SPX> was down just 0.90 of a point, or 0.07 percent, at 1,336.98. The Nasdaq Composite Index <.IXIC> was up 2.51 points, or 0.09 percent, at 2,828.28.

The Dow was led higher by DuPont

, which gained 1.8 percent to $55.44. In early afternoon trading, all three major U.S. stock indexes briefly touched session highs.

Banks were among the worst performers on concerns about their exposure to euro-zone debt and sluggish U.S. growth. The KBW Bank Index <.BKX> fell 0.6 percent, with Bank of America Corp , the Dow's biggest loser, down 2.5 percent at $10.72.

I believe that problems like Greece's will appear again, and that could give markets a reality check, McGervey said, adding that there was a correlation between the European news and banking shares.

Moody's downgrade of Portugal's credit rating on Tuesday to junk cast new doubt on European efforts to rescue distressed euro-zone states without debt restructuring.

Reflecting concerns about the euro-zone debt crisis, the iShares MSCI Italy index fell 3.1 percent and the iShares MSCI Spain index lost 2.2 percent.

China's central bank increased interest rates for the third time this year on Wednesday, making clear that taming inflation is a top priority as its economy slows gently.

The Institute for Supply Management services index showed the pace of growth in the U.S. services sector dipped modestly in June, while prices paid fell sharply to the lowest level since August 2010.

Volume has been light, a trend expected to continue throughout the holiday-shortened week, and this could keep trading choppy.

(Reporting by Ryan Vlastelica; Editing by Jan Paschal)