delivered the opinion of the court:
On May 14, 1906, John P. Hohenadel, appellant, filed his bill of complaint in the circuit court of Cook county against Jesse O. Steele, the appellee, alleging that Elizabeth Vinni Steele, who would be four years old on July 21, 1906, was the daughter of Jesse O. Steele and Julia Steele, the deceased daughter of complainant; that Jesse O. Steele misused his wife in her lifetime and- drove her and the child from home; that they came to the home of complainant and remained there until the death of Julia Steele, on April 29, 1906; that the defendant was unfit to have the care and custody of his child and had no home where she could have proper care and attention, and that it was for the best interest of the child to continue to live with the complainant and be brought up in his family. The bill sought to have the defendant removed as natural guardian and the complainant appointed as guardian. Defendant answered the bill, denying the charges of cruelty or that he was an unfit person to have the custody of his child, and on June 14, 1906, he filed a cross-bill, alleging that it was best for the future welfare of the child that he should have its custody, and that Hohenadel was unfit morally and unable financially to take care of her. Hohenadel answered the cross-bill on the same day, denying the charges against him. Replications were filed and the cause was referred to *231a master in chancery, who reported that upon the conclusion of the evidence the parties, at his suggestion, reached an amicable agreement regarding the custody, care and maintenance of the child, and agreed to a decree, a draft of which was submitted with the report, which bore the O. K. of the solicitors for both parties and the approval of the master. In view of the agreement the testimony was not reported. In pursuance of the report and recommendation of the master, the consent decree reported by him was entered by Hon. Charles M. Walker, one of the judges of said court. That decree appointed Hohenadel and Steele joint guardians of the person of the child until her majority and provided that her home should be with Hohenadel; that when she arrived at the proper age, not prior to her sixth birthday, she should be placed in a Roman Catholic school and attend the same until she was eight years of age, when she should be sent to a boarding school, known as the Christian Sisters of Charity, the Josepheuum, or some similar Roman Catholic school to be selected by the said guardians and the expense to be borne by both, and that the parties were to have the right to the custody of the child alternately for specified periods, with other provisions for vacations, etc.
On April 18, 1907, Steele filed a petition in the court praying that the consent decree be modified and changed so as to give him the sole custody of the child. The court dismissed the petition but gave leave to file an amended petition, which was filed on April 27, 1907. It averred that there had been a material change in conditions; that petitioner then had a suitable home for the child; that the conditions at Hohenadel’s home had become unsuitable, and alleging various other reasons why the petitioner should have the sole custody. The petition was sworn to, and Hohenadel answered it under oath on May ix, 1907, denying that there had been any material change in the conditions and circumstances, denying all charges tending to *232show that his home was not the proper place for the child, and alleging that he had fully respected and carried out the decree. The amended petition was heard by Hon. Thomas G. Windes, one of the judges of the circuit court, on the verified petition and answer thereto and numerous affidavits, and that method of determining the issue is not questioned by either party. On May 14, 1907, said judge entered an order finding that since the decree entered by agreement there had been material changes in the situation of the parties and of the ward, which are recited in the order; that it was prejudicial to the interest of the child to be in the custody of two different persons alternately; that it interfered with her education and discipline, and that Steele was then a proper person to have the care, control and education of the child and was then maintaining a suitable home for her. It was therefore ordered that the decree of June 16, 1906, be modified, and the sole care, custody and education of the child were given to Steele and her permanent abode was fixed at his home. From that order Hohenadel appealed to the Appellate Court for the First District, and his appeal bond was filed and approved on May 18, 1907.
On June 24, 1907, Hohenadel filed his petition praying for the custody of the child pursuant to the terms of the consent decree of June 16, 1906, and on a hearing of the petition, Judge Windes having announced a decision, the petitioner dismissed the petition. On July 18, 1907, Hohenadel filed another petition, addressed to Hon. Richard S. Tuthill, another judge of the circuit court, reciting the consent decree and compliance therewith; the filing of the petition by Steele and the amended petition; the order of May 14, 1907, giving the custody of the child to Steele, and the appeal of Hohenadel therefrom. The petition alleged that when the order modifying the decree was entered it was understood and stated in court that the decree of June 16, 1906, would remain in full force and binding upon both parties until the appeal was determined; that one of the *233conditions inserted in the appeal bond by Hohenadel, on the demand of Steele’s solicitor, was that he should comply with the original consent decree until the final determination of the appeal; that at the time of the entry of the modifying order the child was in Hohenadel’s care under the original decree; that she remained there until May 16, 1907, when Steele came to take possession, and being entitled to the custody of the child for thirty days under that decree the possession was given to him, and that it was his duty to return the child on June 16, 1907, but he did not do so and refused to return her. The petition prayed for an order directing Steele to return the child as provided in the original consent decree, and that he be ruled to show cause why he should not be adjudged guilty of contempt. On July 18, 1907,. Judge Tuthill, upon the presentation of that petition, entered an order that Steele forthwith deliver the child to Hohenadel, to be held under the original consent decree until the Appellate Court should decide the appeal. On the next day an order was entered reciting that Steele had been served with a certified copy of the order and had not complied with it, and further ordering that he stand in contempt of the court, and that a writ of attachment issue to the sheriff commanding him to bring Steele before the bar of the court to show cause, if any he had, why he should not be punished for contempt. On July 19, the writ of attachment having been served on Steele and he being present in court, Judge Tuthill said: “Well, what have you got to say? Are you going to obey the order of the court?” Steele’s solicitor asked for leave to answer, and the court replied: “There is only one thing here, and that is to obey the order of the court. That is all. Obey the order of the court first, and then you can malee answer. You are standing in contempt now.” The solicitor stated that unless the court was satisfied there had been a willful disobedience he would not hold respondent in contempt of court, and asked for an opportunity to make answer under oath, but the *234court refused leave to answer and committed Steele to jail for thirty days for contempt. From that order of commitment Steele appealed to the Appellate Court for the First District and assigned errors on the record. Hohenadel assigned as cross-errors the same errors assigned previously on the record in his appeal, and the two cases were consolidated in the Appellate Court. That court affirmed the decree of May 14, 1907, altering the consent decree, and reversed the orders of July 18" and 19, 1907. From the judgment of the Appellate Court Hohenadel appealed to this court.
A parent has the right to the custody of his child as against the world unless he has forfeited his right or the welfare of the child demands that he should be deprived of it. (Cormack v. Marshall, 211 Ill. 519; Sullivan v. People, 224 id. 468.) When the bill was filed by Hohenadel the parties agreed to a decree appointing them joint guardians of the child and providing that her home should be with Hohenadel, but they were to have her custody alternately, and other provisions were made. While Steele could not absolve himself from parental duties by such an agreement, it was competent for him to enter into it so far as his personal rights were concerned, and by the agreement he surrendered at least a portion of his rights as a parent. The decree entered by agreement was not, in a strict legal sense, a judicial decree, but it was in the nature of a solemn contract between the parties entered by the court. There had been no finding by the court that Steele was not a fit or proper person or that Hohenadel was, or that the welfare of the child demanded that she should be left in the custody of Hohenadel, or that the other stipulations of the decree should be carried out. The decree being by agreement and not the result of the judgment of the court, a rehearing could not be allowed, and it could not be impeached or set aside upon a bill of review for errors of law apparent on its face or on account of additional evidence. It could only *235be set aside by an original bill in the nature of a bill of review. (Armstrong v. Cooper, 11 Ill. 540; Knobloch. v. Mueller, 123 id. 554; Cox v. Lynn, 138 id. 195; First Nat. Bank of Joliet v. Illinois Steel Co. 174 id. 140; Krieger v. Krieger, 221 id. 479; 5 Ency. of PI. & Pr. 961.) There was no bill filed for the purpose of setting aside the decree, and nothing in the petition would have justified the court in setting it aside if the proceeding had been proper for that purpose. The parties, however, could not by their agreement surrender the rights of the child, and if there was a material change in the conditions, the court, having in view the welfare of the child, would change any decree when necessary, on proper application. A decree respecting the custody of a child is exceptional in its character and is always regarded as temporary. (Petition of Smith, 13 Ill. 138; Cormack v. Marshall, supra.) Although Steele could not impeach the decree entered under his agreement or set it aside, we are of the opinion that he might present to the court, by his petition, the fact that material changes had taken place in the condition of the parties affecting the welfare of the child.
The affidavits were contradictory in the extreme and wholly irreconcilable on every question involved. The affidavits presented by each party extolled such party as a paragon and condemned the opposite party as wholly unfit to take care of a child, and upon reading them we are unable to say that the decision of the court was wrong or contrary to the evidence. Neither the prayer for an appeal from that order nor the allowance of the appeal operated as a supersedeas, but the filing and approval of the bond did have that effect. (Holmes v. City of Chicago, 205 Ill. 536.) The supersedeas did not confer any affirmative right, but it did prevent the court from entering any further order in execution of the modifying order appealed from. No process was necessary to carry into effect the order appealed from, but if any further order should be required to com*236pel obedience, the court would have no power to enter it and could only preserve the existing status. (Barnes v. Typographical Union, 232 Ill. 402.) The petition to Judge Tuthill did not ask for an enforcement of the order appealed from, but for the enforcement of a decree which had been changed and altered by the modifying order, which had been appealed from. When Steele was brought before the court to show cause why he should not be adjudged guilty of contempt his solicitor asked leave to answer and claimed his right to do so, but that right was denied to him by the judge-. It is not due process of law to condemn a party without an opportunity to be heard on a charge of contempt not committed in the presence of the court. In direct contempt committed in the presence of the court there is no need of evidence to prove to the court what is already manifest, but in a constructive contempt the party charged must be accorded the privilege of being heard in his own defense. Steele had a right to answer and deny the charge against him or present any defense he might have, and as he was adjudged guilty without a hearing the order committing him for contempt was void. For a contempt out of the view and hearing of the court an offender must be allowed to answer and offer evidence in his own behalf, otherwise the judgment on such a charge, without a hearing or opportunity to present a defense, has no resemblance to a proceeding in a court of law. (4 Fncy. of PI. & Pr. 788.) The order of commitment being void, the Appellate Court did not err in reversing it, and there was no error in affirming the modifying order.
The judgment of the Appellate Court is affirmed.