
41 Cal.Rptr.3d 861 (2006)
138 Cal.App.4th 1009
In re Stacy Lynn MARCUS, on Habeas Corpus.
No. H028866.
Court of Appeal, Sixth District.
April 18, 2006.
*862 Ozro William Childs, Santa Rosa, for Petitioner Stacy Lynn Marcus.
Law Offices of Donald E.J. Kilmer, Donald E.J. Kilmer, San Jose, for Real Party in Interest Ittai Haim Bareket.
Ann Miller Ravel, County Counsel, Mark F. Bernal, Deputy County Counsel, for Respondent County of Santa Clara, Office of the Sheriff.
PREMO, J.
The trial court found petitioner Stacy Lynn Marcus (Mother) guilty of contempt for interfering with a court-ordered visit between Mother's former husband, Ittai Haim Bareket (Father) and their daughter Sydney (Daughter). The court fined Mother $1,000, sentenced her to five days in jail and 120 hours of community service, and ordered her to pay $7,500 in attorney's fees. Mother has petitioned this court for a writ of habeas corpus to prevent the superior court from executing the sentence. Mother does not deny that she committed the acts underlying the contempt. Rather, she maintains that the order she allegedly disobeyed was not a written order and, therefore, cannot be the basis for contempt. We agree and grant relief.

I. FACTUAL AND PROCEDURAL BACKGROUND
Mother and Father were married in 1992. Daughter was born in 1999. She is the only child of the marriage. The family was residing in California when Father petitioned for dissolution of the marriage in May 2000. Mother and Daughter moved to New York while the dissolution was pendingaround September 2001. A status-only judgment of dissolution has since been entered and Father has remarried.
In February 2003, the family court issued an order in the still-pending dissolution action, setting forth a very specific custody and timeshare schedule. The order provided that Mother would have primary physical custody of Daughter during the school year and that Father would have primary custody over the summer and during certain school holidays. The order permitted Father one visit per month during the times Mother had primary custody and it specified the dates and times those visits would take place. The October 2003 visit was described in paragraph "5h" of the order as a visit "in New York from October 24 until October 28." (Italics added.)
*863 On August 7, 2003, the parties were in court for a settlement conference to modify the February 2003 custody order. After reaching an agreement off the record, Mother and Father and their counsel appeared before the court to make a record of the agreement. Father's counsel recited the agreed-upon modifications by going through the February 2003 order paragraph by paragraph. When she came to the modification of paragraph 5h, counsel stated: "[t]he words `in New York' will be stricken." This is the change that underlies the instant proceeding. Father claims that by striking the phrase "in New York" the parties intended to allow him to travel to California with Daughter on his weekend visits. Mother claims that the change meant only that Father was not confined to New York but could travel locally when he came east to visit Daughter. The only other reference to the travel issue during the August 7, 2003 hearing occurred at several points during counsel's recitation of the agreement, when Mother's counsel interjected the proviso: "the pick ups and returns are in New York." At one point she clarified: "The only caveat is if Father wishes to travel with the child in his custodial times on those monthly visits, that he is certainly free to do so."
After the entire agreement was read, the court asked the parties about whether they agreed to the proposal and whether they wanted it to be an order of the court. Both parties answered affirmatively. The court then concluded: "It is an order of the Court. Who will prepare the order?" Father's counsel volunteered.
Father's counsel prepared a proposed order that reflected Father's understanding of the agreement. Mother's counsel objected. As pertinent here, paragraph 5h of the proposed order stated: "In October 2003 Father shall visit with his daughter from October 24 until October 28. He shall pick up the minor child at school at the end of the academic portion of her day on Friday, October 24, have care of her for an extended weekend and return her to school on Tuesday morning, October 28.... Father's pick-up and drop-off of the minor child shall be in New York." Paragraph 10 stated: "Both parents shall have the right to travel with the minor child wherever they choose within the United States;...."
On Friday, October 17, 2003, the trial court signed the written order that Father's counsel had prepared. The order was filed on Tuesday, October 21, 2003 and it was served by mail upon Mother's attorney on Thursday, October 23, 2003.
Meanwhile, on Saturday, October 18, 2003, Father sent Mother an email explaining his plan for visiting Daughter the following weekend. Father and his new wife had recently had a baby and Father's family from "all over the world" was gathering in California for a celebration over the weekend of October 24. Father wanted to bring Daughter to California for the gathering. Because of the party, Father told Mother, "I am therefore considering making an exception and bringing Daughter to California [for the weekend]." He gave Mother airline flight times and other particulars and let her know that he intended to pick Daughter up from school on Friday, October 24 and return her to New York on October 28.
Mother did not agree to the plan because she believed the plan exceeded their custody agreement. She went to court in New York City on Thursday, October 23, 2003, and obtained a protective order directing that Father "not interfere with [Mother's] care and custody" of Daughter and that he "not remove the child ... from the jurisdiction of this court." At this point, neither Mother nor her counsel had received the signed, written order adopting *864 Father's interpretation of the agreement.
Armed with the October 21, 2003 written order, and unaware of the protective order, Father flew to New York on Friday, October 24, intending to collect Daughter when she got out of school that afternoon. When Father arrived at Daughter's school he was approached by two police officers who served him with the protective order Mother had obtained the day before. Father showed them the October 21 order that he carried, but the officers told Father that since the New York order was the more recent, the New York order would control. The officers warned Father that unless he agreed to comply with the protective order they would arrest him. Father returned to California and shortly thereafter filed a petition for an order to show cause why Mother should not be found in contempt. In his petition, Father cited both the August 7, 2003 proceedings and the October 21, 2003 written order as the court order Mother allegedly disobeyed.
At the hearing on the contempt petition, the parties agreed that Mother did not have notice of the October 21, 2003 order since the order had been served by mail only the day before Father arrived in New York to pick up Daughter. The matter proceeded on the assumption that the oral ruling of August 7, 2003, was the basis for the contempt.
At the conclusion of the hearing, the trial court stated: "I think it's clear from the transcript that father, the petitioner, was not prohibited from traveling during his custodial or visitation time." The court found that since Mother knew of Father's intentions, "she clearly had the opportunity and did not take that opportunity to request emergency orders from the California court that clearly had jurisdiction. The fact that she did not do that corroborates for me the fact that she knew that the orders as written here gave him, in fact, the right to travel. [¶] I also find that the petition in New York failed to alert the New York court as to the current custody orders in California. It appears that she intentionally misled the court, misled the court as to her rights."
Since this was the second time in the course of the dissolution proceedings that Mother was found in contempt, the court imposed the maximum penalty: a $1,000 fine, five days in jail, and 120 hours of community service. She was also ordered to pay Father's attorney's fees. (Code Civ. Proc., § 1218, subds. (a), (c)(2).) Mother has paid the fine. She is released on bail pending the outcome of these proceedings.

II. LEGAL FRAMEWORK AND STANDARD OF REVIEW
The willful refusal to obey a valid court order is an act of contempt. (Code Civ. Proc., § 1209, subd. (a)5.) The contempt may take one of two forms. Direct contempt is that committed in the immediate view and presence of the court or of the judge in chambers. Contempt that occurs outside the presence of the court is indirect contempt, which is also known as constructive contempt. (Hanson v. Superior Court (2001) 91 Cal.App.4th 75, 81, 109 Cal.Rptr.2d 782.) This case concerns indirect contempt.
A trial court may take action to punish contempt under section 1218 of the Code of Civil Procedure.[1] The elements of *865 proof necessary to support punishment for contempt are: (1) a valid court order, (2) the alleged contemnor's knowledge of the order, and (3) noncompliance. (Moss v. Superior Court (1998) 17 Cal.4th 396, 428, 71 Cal.Rptr.2d 215, 950 P.2d 59; Code Civ. Proc., § 1209, subd. (a)5.) The order must be clear, specific, and unequivocal. (Wilson v. Superior Court (1987) 194 Cal. App.3d 1259, 1273, 240 Cal.Rptr. 131.) "Any ambiguity in a decree or order must be resolved in favor of an alleged contemnor." (In re Blaze (1969) 271 Cal.App.2d 210, 212, 76 Cal.Rptr. 551.)
In writ proceedings to review an adjudication of contempt, our inquiry is whether there was any substantial evidence before the trial court to prove the elements of the contempt. Absent such evidence, the order must be annulled. (Board of Supervisors v. Superior Court (1995) 33 Cal.App.4th 1724, 1736-1737, 39 Cal.Rptr.2d 906; see also In re Coleman (1974) 12 Cal.3d 568, 573, 116 Cal.Rptr. 381, 526 P.2d 533.)

III. DISCUSSION
Mother argues that the trial court's oral order of August 7, 2003, is not sufficient to support the contempt finding. Her argument touches upon the first two elements of contemptthe existence of a valid order of sufficient particularity and notice of the order.
Ketscher v. Superior Court (1970) 9 Cal.App.3d 601, 604-605, 88 Cal.Rptr. 357 (Ketscher), held that an indirect contempt finding may not be based upon an oral ruling of the court. (See also Lister v. Superior Court (1979) 98 Cal.App.3d 64, 69, 159 Cal.Rptr. 280.) Ketscher involved a dispute between brothersMaurice and Donaldover rights to a piece of real property. The court orally warned the brothers: "`If either party attacks the other, I will consider this to be contempt of court, and I will punish accordingly. If you people can't, and I am speaking to you, Maurice, you have got to keep away from fisticuffs in this case. You are not settling anything at all. You are only complicating it, and I don't like it.'" (Ketscher, supra, 9 Cal.App.3d at pp. 603-604, 88 Cal.Rptr. 357.) Shortly thereafter, Maurice became angry about a fence Donald was erecting and he threw a rock through the window of his brother's car. The court found him in contempt. The appellate court annulled the contempt order, concluding that the trial court lacked jurisdiction to hold Maurice in contempt. "To hold a person in constructive contempt for wilful disobedience of a court order, the order must be in writing or must be entered in the court's minutes. It must also be definitive; otherwise it lacks the certainty required to punish through a proceeding which in a broad sense is regarded as criminal or quasi-criminal." (Id. at pp. 604-605, 88 Cal.Rptr. 357.)
Although Ketscher was decided over 30 years ago, it is still the rule. It has long been settled that the action of the court must be made a matter of record in order to avoid any uncertainty as to what its action has been. (Von Schmidt v. Widber (1893) 99 Cal. 511, 515, 34 P. 109.) The record may be made by a written order signed by the judge and filed with the court (Maxwell v. Perkins (1953) 116 Cal. *866 App.2d 752, 756, 255 P.2d 10) or it may be set forth in detail in the court's minutes (People v. Gordon (1951) 105 Cal.App.2d 711, 716, 234 P.2d 287; see also Cal. Rules of Court, rule 2(d)(2), (3)). But either way, a writing is essential to avoid the uncertainty that can arise when attempting to enforce an oral ruling. Indeed, an "order" is defined by statute as the "direction of a court or judge, made or entered in writing,...." (Code Civ. Proc., § 1003, italics added.)
The need for certainty is especially important in contempt proceedings. Punishment for contempt "can only rest upon clear, intentional violation of a specific, narrowly drawn order. Specificity is an essential prerequisite of a contempt citation." (Wilson v. Superior Court, supra, 194 Cal.App.3d at p. 1273, 240 Cal.Rptr. 131.) An oral ruling is subject to varying memories and may not be clear or specific. Nor is an oral ruling necessarily the unequivocal decision of the court. A court may change its ruling until such time as the ruling is reduced to writing and becomes the order of the court. (Miller v. Stein (1956) 145 Cal.App.2d 381, 384, 302 P.2d 403; In re Marriage of Drake (1997) 53 Cal.App.4th 1139, 1170, 62 Cal.Rptr.2d 466.) Thus it is that only precise court orders as written may be enforced by contempt. (Wilson v. Superior Court, supra, 194 Cal.App.3d at p. 1273, 240 Cal.Rptr. 131.)
The requirement of a written order to support an indirect contempt finding is especially apt in this case. The oral ruling was ambiguous. Counsel's repeated efforts to insure that pick up and drop off would occur in New York could imply an understanding that eliminating the "in New York" limitation meant that Father could travel locally, in and around the New York area. Indeed, Father's first email to Mother described the planned trip to California as an "exception." Theoretically, the written order might have clearly prohibited cross-country travel as Mother maintains was her expectation. Although the trial court found that Mother knew the agreement allowed a trip to California, the finding was based upon inferences derived from the transcript of the oral agreement and from Mother's subsequent conduct. A finding of indirect contempt, however, must be based upon a clear, specific, and unequivocal order. The oral proceedings did not provide that level of certainty.
The court directed the parties to prepare the order in this case. Therefore, the only legally effective order was the signed written order of October 21, 2003. (See In re Marriage of Drake, supra, 53 Cal. App.4th at p. 1170, 62 Cal.Rptr.2d 466, when the "minute order expressly indicates that a written order will be filed, only the written order is the effective order.") We need not decide whether that order is sufficiently definite to be enforced because it is undisputed that Mother did not have notice of that order. It follows that the evidence is insufficient to support the contempt finding.
Father responds that Family Code section 290 provides that an order made pursuant to the Family Code may be enforced by contempt. But an "order" made pursuant to the Family Code must still be written to be effective. The rules of practice and procedure applicable to civil actions apply generally to proceedings under the Family Code. (Fam.Code, § 210.) The Family Code does not define the term "order" other than to state that, where appropriate, the term may mean a "decree." (Fam.Code, § 100.) Thus, in family law cases, as in other cases, an order of the court must be written to be effective. (Cf. In re Marriage of Drake, supra, 53 Cal.App.4th at p. 1170, 62 Cal.Rptr.2d 466.)
*867 Father also argues that the oral proceedings on August 7, 2003, reflected a judicially supervised agreement between the parties and, as such, could have been enforced pursuant to Code of Civil Procedure section 664.6. While this may be so, it is irrelevant. In pertinent part, Code of Civil Procedure section 664.6 provides: "If parties to pending litigation stipulate, in a writing signed by the parties outside the presence of the court or orally before the court, for settlement of the case, or part thereof, the court, upon motion, may enter judgment pursuant to the terms of the settlement." Although this code section provides for enforcement of an oral agreement, the agreement is enforced by means of the resulting judgment, not by the reporter's transcript of the oral proceedings. In any event, our concern is not enforcement of an agreement, but enforcement of the court's order. As Ketscher pointed out, even though the contemnor may have stipulated to the order, since the order was not signed and filed or entered in the court's minutes, it was ineffective as an order of the court and could not form the basis of the contempt finding. (Ketscher, supra, 9 Cal.App.3d 601, 605, 88 Cal.Rptr. 357.)
Mother undoubtedly knew that she could have asked the California court for the protective order she sought in New York. Doing so would likely have been no more difficult for her than going to court in New York since she had an attorney in California who was then negotiating with Father's counsel about the very issue that prompted Mother to obtain the New York protective order. The trial judge was justifiably outraged by Mother's conduct. However, since there was no written order of which Mother had notice, there was no order upon which the contempt finding could be based. Accordingly, we must grant Mother the relief she seeks.

IV. DISPOSITION
The petition for writ of habeas corpus is granted. The order of the superior court dated March 8, 2005, finding petitioner guilty of one count of contempt is annulled. The superior court is directed to issue an order requiring that any fine petitioner paid in connection with the contempt order be returned to petitioner.
WE CONCUR: RUSHING, P.J., and ELIA, J.
NOTES
[1]  Code of Civil Procedure section 1218, subdivision (a) provides: "Upon the answer and evidence taken, the court or judge shall determine whether the person proceeded against is guilty of the contempt charged, and if it be adjudged that he or she is guilty of the contempt, a fine may be imposed on him or her not exceeding one thousand dollars ($1,000), payable to the court, or he or she may be imprisoned not exceeding five days, or both. In addition, a person who is subject to a court order as a party to the action, or any agent of this person, who is adjudged guilty of contempt for violating that court order may be ordered to pay to the party initiating the contempt proceeding the reasonable attorney's fees and costs incurred by this party in connection with the contempt proceeding."
