The juvenile court erred here in ordering the minor confined as punishment for contempt, where the punishment exceeded that which could have been imposed for the offense for which the minor was on probation. The juvenile court had placed the minor on probation and had imposed the maximum penalty for possessing less than an ounce of marijuana on school grounds: a fine of $250. The prosecution then filed a contempt petition based on subsequent violations of the probation conditions. The juvenile court found the allegations true, and imposed 60 days in juvenile hall, with 30 days stayed. The minor then filed this petition for writ of habeas corpus, which the Court of Appeal issued. It then remanded to the juvenile court to vacate its order of confinement.