
508 N.W.2d 105 (1993)
Beverly Ann KIRK, Plaintiff,
v.
IOWA DISTRICT COURT FOR JEFFERSON COUNTY, Defendant.
No. 92-1405.
Court of Appeals of Iowa.
October 5, 1993.
*106 Douglas L. Tindal of Sheurer & Tindal, Washington, for plaintiff.
Bill Kirk, pro se.
Considered by DONIELSON, P.J., and HAYDEN and HABHAB, JJ.
HABHAB, Judge.
In this certiorari proceeding, we are asked to determine whether the district court erred in finding plaintiff Beverly Ann Kirk in contempt and punishing her for violating the visitation provisions of her dissolution decree.
The district court dissolved the marriage of Bill and Beverly Kirk in March 1990. The court divided the parties' assets and debts, ordered Beverly to pay a property settlement, and ordered Bill to pay child support. The court also awarded Beverly sole custody of the parties' two children, despite their stipulation agreeing to joint custody, and established a visitation schedule for Bill. Beverly *107 appealed the child support and other economic provisions of the decree, which we affirmed in an unpublished opinion, but neither party appealed either the custody or the visitation provisions. See In re Marriage of Kirk, 507 N.W.2d 419 (Iowa App.1993) (Table).
Bill attempted to exercise his visitation, but Beverly refused to cooperate. Beverly eventually moved from the parties' hometown of Fairfield, Iowa, to Springfield, Nebraska. She refused to allow officials of the school in Nebraska to communicate with Bill and refused to send copies of the children's school progress to him.
On September 18, 1991, Bill filed an application for finding of contempt pursuant to Iowa Code section 598.23. The district court continued the first hearing because Beverly called on the day of the hearing, claiming one of the children was sick. A hearing was ultimately held on December 6, 1991, at which both parties presented evidence. The district court found that Bill proved that Beverly was in willful contempt because of her failure to allow court-ordered visitations.
Rather than enter a sanction for Beverly's contempt, the district court scheduled a second hearing to determine the best interests of the children. This hearing was held on February 18 and 19, 1992, at which both parties again presented evidence. The court continued the hearing until June 8, to await a court-appointed expert's report.
Beverly phoned the presiding judge on the morning of June 8 and advised the court that she would be unable to attend because she was confined in the hospital.[1] The district court declined to continue the hearing and received testimony from Tom Lazio, the court-appointed expert, who had interviewed the parties and the children. Lazio recommended that custody of the children be immediately transferred to Bill for an extended summer visitation. The district court found that Bill had been denied visitation for a prolonged period of time and that Beverly had interfered with Bill's visitation rights. The district court also noted that Beverly refused to provide the court with her present mailing address and phone number. Based upon Lazio's recommendation, the district court ordered Bill to take immediate custody of the children for summer visitation.
The district court continued the dispositional hearing, and on July 28, 1992, the court modified the dissolution decree, ordering permanent custody of the children transferred to Bill. The district court also ordered Beverly to pay $1000 towards Bill's attorney fees and to pay court costs.
Beverly filed a motion to vacate and a motion to set aside the order. Beverly argued that the court lacked jurisdiction to modify custody because the appeal of the parties' dissolution decree was still pending. In addition, Beverly argued that she had been denied a fair hearing and an opportunity to be heard. The district court overruled the motions. Beverly filed a petition for a writ of certiorari, which our supreme court granted. However, Beverly's motion for a stay was denied.
Beverly also filed a motion alleging that portions of the record designated by Bill to be included in the appendix were unnecessary and frivolous. This issue was submitted with this appeal.

I. Scope of Review.

Certiorari is an action at law and is reviewable on assigned error. Rausch v. Rausch, 314 N.W.2d 172, 174 (Iowa App. 1981); Johnson v. Iowa Dist. Court, 385 N.W.2d 562, 564 (Iowa 1986); Iowa R.Civ.P. 306. Since this matter involves a judgment of contempt, we review to ensure that "the allegedly contumacious actions have been established by proof beyond a reasonable doubt." Phillips v. Iowa Dist. Court, 380 N.W.2d 706, 709 (Iowa 1986).

II. Subject Matter Jurisdiction.

Beverly's first assignment of error is that the district court lacked subject matter jurisdiction to hear the contempt action.
*108 At the time Bill filed the contempt action against Beverly, the appeal of their dissolution decree was still pending before this court. Ordinarily, the filing of a notice of appeal from a final decision divests a district court of jurisdiction until some part of the case is remanded. In re Marriage of Novak, 220 N.W.2d 592, 596 (Iowa 1974); McCauley v. Municipal Court, 254 Iowa 1345, 1346, 121 N.W.2d 96, 96 (1963). However, a trial court, after a party appeals, retains jurisdiction to proceed on "issues collateral to and not affecting the subject matter of the appeal." In re Estate of Tollefsrud, 275 N.W.2d 412, 418 (Iowa 1979).
Additionally, a trial court may enforce a decree while its correctness is being appealed, unless a supersedeas bond is filed or a stay is entered by the court. Lutz v. Darbyshire, 297 N.W.2d 349, 352 (Iowa 1980). The power of a court to impose sanctions for failure to abide by its orders is "essential to the efficient discharge of judicial functions." Id. (quoting Yocum v. Gaffney, 257 Iowa 207, 210, 131 N.W.2d 826, 828 (1964)). If there is jurisdiction of the parties and legal authority to make an order, it must be obeyed, however erroneous or improvident. Id. (citing In re Marriage of Welsher, 274 N.W.2d 369, 371-72 (Iowa 1979)).
One of the sanctions available to courts is the power to punish for contempt. In dissolution proceedings, a court's contempt power is governed by Iowa Code section 598.23, which states in part:
1. If a person against whom a temporary order or final decree has been entered willfully disobeys the order or decree, the person may be cited and punished by the court for contempt and be committed to the county jail for a period of time not to exceed thirty days for each offense.
2. The court may, as an alternative to punishment for contempt, make an order which, according to the subject matter of the order or decree involved, does the following:
. . . . .
b. Modifies visitation to compensate for lost visitation time or establishes joint custody for the child or transfers custody.

Iowa Code § 528.23 (1991) (emphasis added).
We find the trial court had subject matter jurisdiction to consider the contempt application. Beverly originally appealed the economic provisions of the dissolution decree, not the provisions governing custody and visitation. Visitation was therefore a collateral matter, over which the trial court retained jurisdiction. See Tollefsrud, 275 N.W.2d at 418 (appeal should not disrupt district court's jurisdiction "over questions unrelated to the appeal").
Additionally, we note that the trial court's sanction is expressly allowed by Iowa Code section 598.23(2)(b). The court found Beverly was willfully disobeying the visitation order, and accordingly increased Bill's visitation on June 8, 1992. On July 9, the court found that Beverly was still refusing to allow Bill any visitation, and ordered Beverly to deliver the children for visitation on July 15. On July 28, the court found that Beverly was still in contempt of its visitation orders, and concluded that a change in custody was warranted. We find nothing in the record to contradict the court's conclusions. As our supreme court has said,
[t]he sentence imposed [for contempt] was largely within the discretion of the trial court. It is only where this discretion has been grossly abused that we will interfere. The sentence here is severe, but we cannot say it was beyond the fair discretion of the trial court.
Battani v. Grund, 244 Iowa 623, 632, 56 N.W.2d 166, 172 (1952).

III. Due Process.

Beverly's next assignment of error is that the district court violated her due process rights by holding her in contempt after the December 6, 1991, hearing. Beverly claims that the time allotted was constitutionally insufficient for her to argue her case.
It is well settled that the extent and nature of the hearing required for due process varies according to the needs and circumstances of the given case. Auxier v. *109 Woodward State Hosp.-Sch., 266 N.W.2d 139, 142 (Iowa), cert. denied 439 U.S. 930, 99 S.Ct. 319, 58 L.Ed.2d 324 (1978). The basic elements are notice and an opportunity to be heard. In re K.L.C., 372 N.W.2d 223, 226 (Iowa 1985). The essential requirement is one of "fundamental fairness." In re J.S., 470 N.W.2d 48, 52 (Iowa App.1991). After reviewing the record from the December 6, 1991 hearing we determine that Beverly was given sufficient time to present her case. We find no violation of due process.
Beverly also asserts she was not allowed to present her case at the February 18 and 19, 1992, hearings. However, Beverly was given an opportunity to cross-examine each witness and then to present testimony from one of her own witnesses. The court continued the matter until June 8 to allow Beverly to present additional evidence, but she failed to appear on that date. We find that Beverly was given ample opportunity to present evidence and that she has failed to establish any violation of her due process rights.
Beverly next contends the district court erred because she was not present when punishment and disposition were ordered on July 28, 1992, nor was she present on June 8, 1992, when important evidence was presented. In Opperman v. Sullivan, 330 N.W.2d 796 (Iowa 1983), the supreme court rejected this very argument. The court held that Iowa Code section 665.7 provides authority for a district court to impose punishment for contempt despite an offender's absence. Id. at 797. In Opperman, the record "plainly show[ed] Opperman voluntarily absented himself from the proceeding with full awareness of the possible consequences." Id. at 798. We believe the same is true here.
The court gave Beverly notice of both hearings. It also informed her that a change in custody was a potential sanction facing her. The court concluded that Beverly did not have any credible reason to be absent. Based on our review of the record, we agree, and hold that Beverly's due process rights were not violated.

IV. Multiple Punishments.

Beverly's next argument is that the district court erred when it gave Bill compensatory visitation on June 8, 1992, and then gave Bill permanent sole custody on July 28, 1992. Beverly argues that this was exacting a multiple punishment which is not authorized by the statute.
In Phillips v. Iowa District Court, 380 N.W.2d 706 (Iowa 1986), the custodial spouse was sentenced to jail time for contempt, and the noncustodial spouse was granted extra visitation. Id. at 707. The supreme court reversed, explaining that a court cannot punish one instance of contempt with both jail and a modification. Id. at 709-710. We believe this case is distinguishable.
Unlike the plaintiff in Phillips, Beverly was initially ordered to give additional visitation as punishment for her contempt of the dissolution decree. Only when Beverly committed further contempts by failing to give Bill this additional visitation, did the district court order a change in custody. We find Beverly was in contempt on several occasions and that each instance of contempt was separately punishable.

V. Best Interests of the Children.

Beverly next contends the district court erred when it transferred custody from Beverly to Bill because it did not consider the best interests of the children.
The district court was required to consider the long range best interests of the children before entering any order modifying the dissolution decree, whether the modification occurred in a contempt or modification proceeding. Phillips, 380 N.W.2d at 710. We find ample evidence in the record that the district court considered the children's best interests.
The district court held hearings in February and June, 1992, specifically to determine the best interests of the children. The court appointed an expert to interview the children and the parents, and make a recommendation to the court. The expert testified as follows:
Based on the three visits I had and the observations of the parents and the children *110 I am recommending that there be a definite change, and I think it will have to be done through the Court.... I think there will be some adjustment and certainly would support that the kids be given the opportunity for ongoing counseling and a period of adjustment with their father. I expect there will be some problems. Based on that I would still recommend that the custody be transferred to Mr. Kirk and the visitations be given to Mrs. Kirk, and at this point I am concerned that she might attempt to thwart that by either not cooperating or by even leaving the area.
We find the court properly considered the children's best interests.

VI. Cost of Appendix.

Beverly's final argument is that Bill included unnecessary materials in the appendix. Iowa Rule of Appellate Procedure 15(c) states in part:
The cost of producing the appendix shall be taxed as costs in the case, but if either party shall cause matters to be unnecessarily included in the appendix the appropriate appellate court may impose the cost of producing such parts on that party.
We do not think Bill's designations were unnecessary. Thus, we tax the full costs of this appeal to Beverly.
WRIT ANNULLED.
NOTES
[1]  The district court advised Beverly she would be required to furnish some kind of medical substantiation. She did not do so.
