WASHINGTON (MarketWatch) — U.S. consumer prices were unchanged in July, as lower energy prices offset gains in the cost of food and other items, the Labor Department reported Wednesday.

An index of energy prices declined 0.3% in July, while the food index rose 0.1%. The so-called core consumer price index, which excludes the volatile categories of food and energy, rose 0.1%.

Economists surveyed by MarketWatch had expected an increase of 0.2% for both the overall and core-price gauges. See economic calendar.

In June overall consumer prices were also unchanged, while the core gauge rose 0.2%.

The CPI rose 1.4% over the year through July, the smallest 12-month change since late 2010. The core rate gained 2.1% over the past 12 months, the smallest gain since late 2011.

The Federal Reserve watches consumer prices, and is expecting inflation to be relatively low through 2013.

Although there have been recent gains in food commodity prices due to the severe Midwest drought, analysts say consumer prices may not be impacted for months. However, at the wholesale level, corn prices rose about 35% in July, according to a Tuesday report from the Labor Department. Read more about wholesale prices.

“This will eventually make its way into food and energy prices and therefore headline inflation,” said James Marple, senior economist at TD Economics, in a research note. “However, the rise should prove temporary and does not change an overall economic picture that continues to look disinflationary.”

Consumer-price details

Within the CPI’s food index, food-at-home prices were unchanged in July, as prices increased 0.3% for meats, poultry, fish, and eggs, and declined 0.3% for fruits and vegetables. The price for white bread rose 2.3% in July, the largest gain since October, while potato prices fell 3.3%, the biggest drop since 2009.

Within the energy index, gasoline prices rose 0.3%. Meanwhile, electricity prices fell 1.3%, the largest drop since 1998.

Also in July, prices rose for apparel, medical care and shelter. Tobacco prices rose 1.1%, the largest gain since 2010. Meanwhile, prices fell 2.7% for airline fare, the biggest drop since 2008, as prices also declined for new vehicles and alcoholic beverages.

The Labor Department also reported that real average hourly earnings were unchanged in July, compared with a 0.3% gain in June.

Elsewhere Wednesday, the New York Federal Reserve Bank reported that an index of manufacturing dropped sharply in August for the first contraction in nine months. Read more about manufacturing.