NEW YORK (TheStreet) -- Last week's worries over China's economic health came back to haunt markets on Tuesday. Concerns over growth in the world's second-largest economy pressured Wall Street even as domestic data on the U.S. housing market supported a robust recovery. 

Benchmark indexes struggled to break out from a narrow range of trading throughout the session. The S&P 500 was down 0.26%, the Dow Jones Industrial Average slipped 0.19%, and the Nasdaq fell 0.63%.

China's Shanghai Composite plummeted more than 6%, despite the People's Bank of China's efforts to stem capital outflows in light of its weakened currency. The Chinese central bank injected 120 billion yuan ($18.8 billion) into the market in its biggest one-day injection in just over a year-and-a-half.

"The PBOC had injected a large amount of dough into the system via reverse repurchase operations (short-term loans to commercial lenders), but the government did not directly prop up the equity market late in the day, like some investors had expected," said Stephen Guilfoyle, managing director of NYSE Floor Operations, in a note. "This exacerbated the downward pressure."

The threat of slowing growth in the world's second-largest economy, and fears the Chinese central bank might not be able to counter it, hurt materials stocks on Tuesday. Freeport-McMoRan (FCX) , Dow Chemical (DOW) , and Alcoa (AA) were among the worst performers, while the Materials Select Sector SPDR ETF (XLB) fell 0.7%.

Homebuilder stocks were a bright spot on markets, following the latest sign of a recovery in the U.S. housing market. Construction on U.S. houses in July climbed to the highest level since before the recession, up 0.2% to an annual rate of 1.21 million in July, according to the Commerce Department. Economists had expected a seasonally adjusted reading of 1.19 million. Starts for June also were upwardly revised to 1.2 million from 1.17 million.

"With affordability remaining high, mortgage rates still low, and labor market activity accelerating, we expect the housing market trajectory to continue gradually gaining momentum in the months ahead," said Cheng Chen, U.S. macro and rates strategist at TD Securities.

Lennar (LEN) , Hovnanian Enterprises (HOV) , KB Home (KBH) , D.R. Horton (DHI) , and PulteGroup (PHM) were all higher, while the SPDR S&P Homebuilders ETF (XHB) added 1.2%.

In earnings news, Home Depot (HD) climbed 2.6% after a solid second-quarter report. The home-improvement chain reported sales of $24.8 billion, up 4.2% from a year earlier, while U.S. comparable-store sales jumped 5.7%. The company expects full-year sales growth between 5.2% and 6%.

Wal-Mart (WMT) was weighing on markets after falling 3.4% on missed profit estimates in its second quarter. The world's largest retailer earned $1.08 a share, 4 cents below estimates, while revenue of $120.2 billion rose just 0.1% from a year earlier. Full-year earnings guidance was revised down to as high as $4.70 a share after a previous range of $4.70 to $5.05 a share.

Urban Outfitters (URBN) was 1.9% lower after reporting a mixed quarter. The retailer earned 52 cents a share, 3 cents above estimates, while revenue of $867.46 million fell short by $14 million. Comparable-store sales rose 4% over the quarter, driven by a 14% jump at its Free People brand.

Dick's Sporting Goods (DKS) added 3.8% after reporting a mixed quarter with earnings coming in above estimates, while sales fell short. Same-store sales rose 1.2%, driven by a 1.5% gain at Dick's stores which offset a 2.9% decline at Golf Galaxy. Third-quarter guidance of 45 cents to 48 cents a share was as analysts had expected.

TJX (TJX) jumped more than 7% after beating estimates on the top- and bottom-lines. Comparable-store sales rose 6% with a 4% increase at Marmaxx and 9% climb at HomeGoods. Full-year profit guidance came in short, though, with a range of $3.24 to $3.28 a share below estimates of $3.30.

American Apparel (APP) looked to be in trouble after its most recent quarter's earnings report showed only $11.2 million in cash. The retailer also reported a net loss of 11 cents a share on sales of $134.39 million, down 17% from a year earlier.