
16 Ill. App.3d 549 (1973)
306 N.E.2d 604
DONNA SULLIVAN, Plaintiff-Appellee,
v.
TIMOTHY SULLIVAN, Defendant-Appellant.
Nos. 58085, 58322 cons.
Illinois Appellate Court  First District (5th Division).
December 14, 1973.
*550 Joseph R. Curcio, of Chicago, for appellant.
James M. Keane, of Chicago, for appellee.
Reversed and remanded.
Mr. JUSTICE LORENZ delivered the opinion of the court:
Defendant appeals from the orders finding him in contempt of court *551 and sentencing him to ninety days in the House of Correction and the assessment of plaintiff's attorney's fees.
Pursuant to the divorce decree entered October 1, 1968, defendant was ordered to pay plaintiff $34 per week as child support for their three minor children. By May 17, 1972, defendant owed plaintiff $2,310 whereupon plaintiff petitioned the court for a rule to show cause why defendant should not be held in contempt of court. Defendant answered admitting the terms of the divorce decree, and the arrearage in the amount specified but denying that he willfully refused to pay.
At trial, in response to the court's inquiry, defendant testified he was dismissed from his job as an insurance adjuster for Maine Insurance Company in November, 1970; that he had remarried in May, 1972, and has since been supported by his present wife. Defendant testified that he had sought employment in his line of work at almost all the insurance companies, but that he had been unsuccessful due to poor recommendations from his previous employer. He further testified that a hernia condition had prevented him from being hired at other types of employment. It was also established that defendant was without funds with which to pay his obligations, that rentals collected from a building he owned jointly with his ex-wife were the property of his ex-wife under the divorce decree and that his only other asset, an automobile, had been repossessed when his present wife stopped making payments. He also testified that he has been unable to contribute financially to his second marriage except for a sum of $500 earned while honeymooning in New Mexico. On questioning by the court, defendant objected to assigning his beneficial interest in the building and thereby getting a credit against the child support allowances because plaintiff has been a recipient of public aid and therefore the Department of Public Aid might have acquired a lien on the arrearages.

OPINION
Defendant contends that the order finding him in contempt of court is fatally defective in that its effect is criminal in nature. The order provides:
"It is hereby ordered, adjudged and decreed that * * * the Court having found the defendant, Timothy Sullivan, in wilful contempt, is hereby ordered, to the House of Correction for 90 days on their work release program."
 1-4 There is a clear distinction between criminal and civil contempt. (Eastman v. Dole, 213 Ill. App. 364, cert. denied.) A criminal contempt is conduct directed against the majesty of the law or the dignity and authority of the court or judge acting judicially whereas a civil contempt ordinarily consists in failing to do something ordered to be done by a *552 court in a civil action for the benefit of an opposing party therein. (People v. Cholson, 412 Ill. 294, 106 N.E.2d 333; People v. Redlich, 402 Ill. 270, 83 N.E.2d 736; Powers v. People, 114 Ill. App. 323.) In determining whether the contempt is criminal or civil, it is important to consider the character of the action in which the contempt has occurred. (People v. Redlich, 402 Ill. 270, 83 N.E.2d 736; People v. Elbert, 287 Ill. 458, 122 N.E. 816.) There is civil contempt rather than criminal contempt where a party to an action obtains an order of the court commanding another such party to do some act for the benefit or advantage of his adversary, and the party so ordered wrongfully fails or refuses to do as directed. (Eastman v. Dole, cert. denied, 213 Ill. App. 364.) Hence, a proceeding to commit a party to jail for refusing to comply with a court order to pay money to another is civil in nature (LaRue v. LaRue, 341 Ill. App. 411, 93 N.E.2d 823) since the dignity of the court is only incidentally involved. (Meaden v. W.J. Anderson Corp., 301 Ill. App. 390, 23 N.E.2d 74.) It follows that the failure to pay child support is civil contempt.
 5-7 Imprisoning a party for refusing to pay money to another does not solely aim to punish the contemnor but also to obtain for the other party such sums as are due and owing. (People ex rel. Meier v. Lewe, 380 Ill. 531, 44 N.E.2d 551.) A proper order therefore should provide the contemnor's key to his cell. It follows that defendant's imprisonment here for a definite time is improper. The order should have provided the amount defendant was required to pay according to his ability to meet the payments, and to provide terms upon which the balance should be paid, so that by satisfying the order defendant could purge himself of the contempt and be discharged from jail. (White v. Adolph, 305 Ill. App. 76, 26 N.E.2d 993; Todd v. Arbuckle, 1 Ill. App.3d 32, 272 N.E.2d 257; LaRue v. LaRue, 341 Ill. App. 411, 93 N.E.2d 823.) The order failed to provide these opportunities.
 8, 9 Not every order for payment of money is enforceable by imprisonment for contempt. It is only where the disobedience is willful. (Humpa v. Hedstrom, 345 Ill. App. 289, 102 N.E.2d 686; Tudor v. Firebaugh, 364 Ill. 283, 4 N.E.2d 393; LaRue v. LaRue, 341 Ill. App. 411, 93 N.E.2d 823.) There is no contempt where the failure of a person to obey such an order is due to poverty, insolvency or other misfortune (O'Callahan v. O'Callahan, 69 Ill. 552, LaRue v. LaRue, 341 Ill. App. 411, 93 N.E. 2d 823, 12 I.L.P. § 33 Contempt) unless such person's inability to pay is the result of a wrongful or illegal act or he has willfully placed himself in such a position. (Cox v. Rice, 375 Ill. 357, 31 N.E.2d 786; Adams v. Rakowski, 319 Ill. App. 556, 49 N.E.2d 733; McAtee v. McAtee, 116 Ill. App. 511.) In the case at bar there has been no showing of willful contempt.
*553 Accordingly, the order sentencing defendant to 90 days in the House of Correction is reversed and remanded for a proper order to be entered if further proceedings determine defendant to be in willful contempt of court. Since the order for contempt was improper, the order assessing attorneys' fees to defend this appeal was likewise improper.
Reversed and remanded.
DRUCKER, P.J., and SULLIVAN, J., concur.
