Higher prices for some items were offset by declines in other areas, such as petrol, airfares and clothing.