
46 Cal.App.4th 1099 (1996)
LUCILLE SNYDER, Plaintiff and Respondent,
v.
MARCUS & MILLICHAP, Defendant and Appellant.
Docket No. A072294.
Court of Appeals of California, First District, Division Five.
June 25, 1996.
*1100 COUNSEL
Bronson, Bronson & McKinnon, William H.G. Norman, Robert J. Stumpf, Jr., and Randall I. Barkan for Defendant and Appellant.
Bruce S. Osterman and Steven F. Schossberger for Plaintiff and Respondent.
*1101 OPINION
PETERSON, P.J.
We have seen this case before. Appellant Marcus & Millichap prevailed on a previous partial appeal concerning punitive damages and damages for "emotional distress." However, Marcus & Millichap's prior partial appeal did not challenge the entry of judgment against Marcus & Millichap for compensatory damages.
Marcus & Millichap contends the trial court should have awarded Marcus & Millichap its attorney fees for the prior appeal, under the fee provision of a relevant contract between the parties, because Marcus & Millichap was the prevailing party on the partial appeal even though judgment was entered against Marcus & Millichap for compensatory damages. We affirm the judgment because we conclude Marcus & Millichap was not the overall prevailing party in the litigation and suffered the entry of an adverse judgment, even though Marcus & Millichap prevailed on subsidiary damages issues on the prior partial appeal.

I. FACTS AND PROCEDURAL HISTORY
In our previous opinion in this case (Snyder v. Stephens (Feb. 27, 1995) A062373 [nonpub. opn.]) we ruled in favor of Marcus & Millichap on its two appellate contentions, concluding that the trial court wrongly awarded punitive damages and emotional distress damages to Lucille Snyder (Snyder) on her claims of real estate fraud. Marcus & Millichap did not appeal the award of compensatory damages. We also rejected numerous contentions made by Snyder and other parties. The result after the previous appeal, as between Marcus & Millichap and Snyder, was that Snyder was awarded compensatory damages of $550,000 plus prejudgment interest of $284,900; we also reversed the award against all defendants for emotional distress damages of $120,000 and against Marcus & Millichap for punitive damages of $950,000. We awarded Marcus & Millichap its costs on appeal under California Rules of Court, rule 26, because it had prevailed on every issue on the partial appeal, even though it had suffered an unappealed judgment for compensatory damages in the trial court.
Subsequently in the trial court, Marcus & Millichap sought an award of its attorney fees for the previous partial appeal on which it had prevailed. The real estate contract between Marcus & Millichap and Snyder in issue here provided in relevant part as follows: "11) ATTORNEYS' FEES: If this Agreement gives rise to a lawsuit or other legal proceedings between any of the parties hereto, including Agent [i.e., Marcus & Millichap], the prevailing party shall be entitled to recover actual court costs and reasonable attorneys' fees in addition to any other relief to which such party may be entitled."
*1102 The trial court ruled in substance that Marcus & Millichap was not entitled to an award of fees for work on the previous appeal, because it was not the prevailing party in the lawsuit, and had only prevailed in the appeal by reducing the amount of the judgment against it, which as reduced awarded compensatory damages of $550,000 plus interest of $284,900 after the appeal, for a total net judgment against Marcus & Millichap of $834,900. Marcus & Millichap brought a timely appeal from an amended judgment embodying this trial court order.

II. DISCUSSION
(1a) We affirm the trial court's ruling on fees. Marcus & Millichap was not the prevailing party in the lawsuit because it suffered a net judgment against it of $834,900. While Marcus & Millichap had prevailed on its partial appeal in reducing the amount of this judgment by $1,070,000, Marcus & Millichap was still only the prevailing party in its partial appeal, not the prevailing party in the lawsuit. Therefore, the trial court properly awarded Marcus & Millichap its appellate costs, but not its attorney fees, in the prior appeal.
(2) We exercise independent review over this appeal from the trial court's order because it raises a pure issue of law regarding the entitlement to fees. (See Bussey v. Affleck (1990) 225 Cal. App.3d 1162, 1165-1166 [275 Cal. Rptr. 646].) (1b) Marcus & Millichap sought such fees in the trial court under the terms of Civil Code section 1717 (section 1717) which provides in pertinent part: "(b)(1) The court ... shall determine who is the party prevailing on the contract.... [T]he party prevailing on the contract shall be the party who recovered a greater relief in the action on the contract...." Under section 1717, Snyder was clearly the prevailing party on the contract, because she received a net judgment of $834,900 against Marcus & Millichap. (See Pirkig v. Dennis (1989) 215 Cal. App.3d 1560, 1568 [264 Cal. Rptr. 494] (Pirkig); Resolution Trust v. Midwest Fed. Sav. Bank (9th Cir.1993) 36 F.3d 785, 799-800 (Midwest).
In Pirkig, supra, the court held defrauded purchasers of real estate were entitled to a fees award under section 1717 in analogous circumstances. The purchasers were originally awarded damages of $51,000, but in subsequent proceedings this damages amount was greatly reduced and the purchasers eventually received only $28,300 in settlement from the sellers, and an award of $7,500 in damages against the broker, which was offset by the amount of the settlement with the sellers. Nevertheless, the purchasers were properly awarded fees of $15,750 under section 1717 and Code of Civil Procedure section 1032. (Pirkig, supra, 215 Cal. App.3d at pp. 1563-1564, *1103 1567-1568.) "In the case at bench [the purchasers] were correctly found to be the prevailing parties in the lawsuit. Furthermore, they recovered a greater relief in the action inasmuch as [the broker], together with the other defendants, were found liable for negligent misrepresentation and [the purchasers] were awarded damages and received a substantial sum by way of settlement from the faulty defendants." (Id. at p. 1568.)
In Midwest, supra, the Ninth Circuit Court of Appeals applied California law and the current language of section 1717 to uphold an award of fees to a party which had prevailed on its claims for damages of over $5 million, even though the opposing party had succeeded by counterclaim in reducing the damages to this figure from a potential liability of $8-9 million. "Under the specific language [of section 1717] now applicable, [Resolution Trust] must be considered the `prevailing party' because it recovered a greater amount than Orangegate in the complete action on the contract. We affirm the district court's denial of Orangegate's motion for attorneys' fees." (Midwest, supra, 36 F.3d at pp. 800-801.)
The only authority Marcus & Millichap cites which might arguably support its entitlement to a fee award in this situation is an ambiguous dictum in Bank of Idaho v. Pine Avenue Associates (1982) 137 Cal. App.3d 5, 17-18 [186 Cal. Rptr. 695] (Bank of Idaho). The dictum in question seems to imply that fees for a successful appeal might be awarded and then "offset" against the award to the prevailing defendants: "We see no serious difficulty in ascertaining defendants' entitlement to fees; those incurred in the former appeal would be excluded, and plaintiff's fees on such appeal would constitute an offset to any award of fees to defendants for other aspects of the case." (Ibid.)
As the trial court recognized, the Bank of Idaho dictum was cogently criticized a year later in Presley of Southern California v. Whelan (1983) 146 Cal. App.3d 959, 962-963 [196 Cal. Rptr. 1]. We agree with the Presley court's disapproval of the Bank of Idaho dictum which had suggested an "offset" award to a nonprevailing party for fees incurred on a successful appeal which did not result in a net judgment: "Where, however, the defendant ultimately prevails, he is entitled to fees on appeal without offset based on the fees plaintiff incurred on appeal." (Presley, supra, 146 Cal. App.3d at p. 963.)
We also note that the Bank of Idaho dictum is inapposite for another reason. It was based upon a prior and different version of section 1717, which tied the entitlement to fees to a costs award. Since a prevailing *1104 appellant would have been entitled to costs on appeal, it may have seemed plausible to the Bank of Idaho court that a prevailing appellant who received costs on appeal would also receive a fees award under section 1717. However, the present and here applicable version of section 1717 ties the fee entitlement not to a costs award, but to a determination of which party "recovered a greater relief in the action on the contract." (Subd. (b)(1); see Midwest, supra, 36 F.3d at pp. 800-801.) Here, Snyder recovered the greater relief and, in fact, the only relief in the action on the contract.
Section 1717 was the only basis for a fee award which Marcus & Millichap urged in the trial court. On appeal, Marcus & Millichap for the first time attempts to switch horses and claims such an award based upon the wording of Code of Civil Procedure section 1021, which provides: "Except as attorney's fees are specifically provided for by statute, the measure and mode of compensation of attorneys and counselors at law is left to the agreement, express or implied, of the parties; but parties to actions or proceedings are entitled to their costs, as hereinafter provided."
The issue of the application of Code of Civil Procedure section 1021 was not raised in the trial court, where Marcus & Millichap relied only upon section 1717, and is not cognizable on this appeal. We will nonetheless briefly address this untimely claimed basis for a fees award.
Marcus & Millichap implies that it is entitled to fees under Code of Civil Procedure section 1021 because the parties' agreement would allow for such fees. However, the language of the attorney fees provision in the contract between the parties, which we have quoted above, says nothing about allowing fees for a successful partial appeal. It simply adopts the standard of section 1717 and Code of Civil Procedure section 1032, under which the "prevailing party" in the lawsuit would be entitled to fees. Marcus & Millichap does not cite any authority which has held such contract language somehow creates an entitlement to fees under Code of Civil Procedure section 1021. In sum, Marcus & Millichap's argument that it was successful in its partial appeal does not make Marcus & Millichap the "prevailing party" in the lawsuit between the parties. (See Pirkig, supra, 215 Cal. App.3d at p. 1568; Midwest, supra, 36 F.3d at pp. 800-801.)[1]
*1105 The trial court correctly denied Marcus & Millichap an award of fees for the previous partial appeal.[2]

III. DISPOSITION
The judgment is affirmed. Costs on appeal are awarded to Snyder.
King, J., and Haning, J., concurred.
NOTES
[1]  If the parties wished to provide in their agreement for an award of fees on a successful partial appeal, they were free to do so. The contract before us does not do so. We also note the contract in question was prepared by Marcus & Millichap, and its fee provisions would have to be interpreted against Marcus & Millichap in the event of ambiguity.
[2]  Snyder also seeks an award to her for her fees in defending against this appeal. Snyder is entitled to such fees under the parties' contract; Snyder may apply to the trial court for an award of such fees.
