
421 S.E.2d 210 (1992)
Robert L. RAINEY
v.
CITY OF NORFOLK.
Record No. 1236-91-1.
Court of Appeals of Virginia.
August 4, 1992.
*211 John F. Rixey, Virginia Beach (Rixey & Rixey, on brief), for appellant.
Norman A. Thomas, Deputy City Atty. (Philip R. Trapani, City Atty., on brief), for appellee.
Present: KOONTZ, C.J., BAKER and COLEMAN, JJ.
COLEMAN, Judge.
This is an appeal of a civil contempt citation for which the trial court imposed sanctions in order to compel Robert L. Rainey to bring his Norfolk residence into compliance with the Virginia Uniform Statewide Building Code and Norfolk City Code § 11-1 et seq. Rainey contends that the sanctions that the trial judge imposed were illegal and exceeded the permissible scope for civil sanctions, which he alleges must be reasonably calculated to effect compliance with the injunction. We hold that the civil contempt sanctions which the trial judge imposed were neither illegal nor excessive. Accordingly, we affirm the ruling of the trial court.
In May 1990, a judge of the Norfolk circuit court entered a decree in the pending injunction suit that the City of Norfolk had filed against Robert L. Rainey, ordering that Rainey bring his residence into compliance with the statewide and City of Norfolk building codes. Rainey did not appeal the decree. However, he did not comply with the court's order. Therefore, the City of Norfolk moved for an order to *212 show cause why Rainey should not be held in contempt. After a hearing on the motion, the court, on January 30, 1991, held Rainey in civil contempt for intentionally refusing to comply with the court's May 11, 1990, decree. As part of the contempt decree, the trial judge authorized agents of the City or contractors hired by the City to enter upon Rainey's property for the purposes of determining the repairs required to comply with the building code, to bid the job, and to complete the necessary repair work. The decree further enjoined Rainey to vacate the premises while the repairs were being performed and from interfering with the repairs being made. The trial judge also indicated that, as part of the sanctions that he would impose, a personal judgment would be entered against Rainey for the cost of repairs after the work was completed. Rainey appeals from this decree on grounds that we address in turn.

EX POST FACTO LAW
Rainey contends that the trial court's civil contempt citation violates the Virginia and United States constitutional prohibitions against ex post facto laws. We disagree.
"[T]he constitutional prohibition against an ex post facto law applies to criminal proceedings and not to civil proceedings." Huffman v. Commonwealth, 210 Va. 530, 532, 172 S.E.2d 788, 789 (1970). Whether contempt sanctions are criminal or civil is not determined by "the fact of punishment but rather its character and purpose." United Steelworkers v. Newport News Shipbldg. & Dry Dock Co., 220 Va. 547, 550, 260 S.E.2d 222, 224 (1979) (quoting Gompers v. Bucks Stove & Range Co., 221 U.S. 418, 441, 31 S.Ct. 492, 498, 55 L.Ed. 797 (1911)). If the sanction "is for civil contempt the punishment is remedial, and for the benefit of the complainant. But if it is for criminal contempt the sentence is punitive, to vindicate the authority of the court." Id. The primary purpose of a civil contempt proceeding
is to procure the imposition of a punishment which will afford remedial relief to the parties injured by the violation of the injunction. Not only is the proceeding instituted at the instance of the injured parties, but they are parties to it; and it is properly instituted and tried as a part of the injunction suit.
Leisge v. Leisge, 224 Va. 303, 308, 296 S.E.2d 538, 540-41 (1982) (quoting Deeds v. Gilmer, 162 Va. 157, 262, 174 S.E. 37, 78-79 (1934)).
The contempt proceeding against Rainey is civil. It is part of the civil proceeding that the City of Norfolk initiated against Rainey to enjoin and compel him to bring his property into compliance with the state and municipal building codes. The City sought injunctive relief. When Rainey failed to obey the injunction, the City sought a contempt citation to compel compliance with the court's decree. After finding that Rainey intentionally violated the injunction and in order to compel compliance with it, the court authorized the City of Norfolk to make the requisite repairs, for which a personal judgment would be entered against Rainey as necessary costs for bringing him into compliance with the injunction. The trial court's order was not punitive. The court order was, in all respects, remedial and designed to compel Rainey to comply with the building codes, as he was ordered to do by the injunction, and to protect the City's rights. Consequently, the contempt decree was civil, rather than criminal, and it did not violate the United States and Virginia constitutional prohibitions against ex post facto laws. See Huffman, 210 Va. at 532, 172 S.E.2d at 789.

DUE PROCESS RIGHTS
Rainey next contends that the contempt sanctions violated his due process rights. He argues that the state and local building codes, the injunction against him, and the contempt sanctions deprive him of property rights with which he was vested prior to the date the codes were enacted. We reject Rainey's argument. The rights attendant with the ownership of property do not include the right to be free from all government "interference" with the uses to which an owner puts his or her property or *213 the condition in which he or she maintains it.
In Virginia, statutes are presumed not to be applied retrospectively. Booth v. Booth, 7 Va.App. 22, 26, 371 S.E.2d 569, 571-72 (1988). The General Assembly is free, however, to enact legislation that applies retrospectively so long as it does not impair existing contractual obligations or vested rights. Brushy Ridge Coal Co. v. Blevins, 6 Va.App. 73, 79, 367 S.E.2d 204, 207 (1988). However, where the General Assembly enacts legislation that is clearly intended to apply retrospectively, the statute will apply to situations or occurrences that predated the enactment of the statute. Foster v. Smithfield Packing Co., 10 Va. App. 144, 147, 390 S.E.2d 511, 513 (1990).
The General Assembly clearly intended that the Uniform State Building Code (USBC) be applied retrospectively. The legislature created the Board of Housing and Community Development (Board) and directed it to "adopt and promulgate a Uniform Statewide Building Code." Code § 36-98. The Board was further authorized to "adopt and promulgate as part of the Building Code minimum building regulation for existing buildings to ensure the protection of public health, safety, and welfare." Code § 36-103 (emphasis added). Pursuant to this grant of authority, the Board promulgated the USBC, see VR XXX-XX-XX,[1] and in Section 100.5.1 of the USBC, provided that "[b]uildings ... constructed... before the effective date of the initial edition of the ... [USBC] shall be maintained in compliance with the Building Maintenance Code."
Rainey inherited the subject property from his mother in 1967. The effective date of the initial USBC was September 1, 1973. Because the legislature clearly intended that the USBC and regulations were to be applied retrospectively, the Code and regulation applied to Rainey's property, unless to do so would deprive him of some vested property right.
Rainey argues that the effect of the contempt sanctions deprives him of vested property rights. He asserts that the contempt sanctions, imposed because of his failure to comply with the injunction to bring his property into compliance with the building code, deprived him of his right to enjoy and live on his property free from government interference. He contends that his right to the use and enjoyment of his property was vested prior to the effective date of the USBC. As previously noted, the rights attendant with the ownership of private property do not include the right to be absolutely free from government regulation. "The due process guarantee does not forbid reasonable regulation of the use of private property." Alford v. City of Newport News, 220 Va. 584, 585, 260 S.E.2d 241, 242 (1979). Pursuant to the state police power, the legislature may "restrict personal and property rights in the interest of public health, public safety, and for the promotion of the general welfare." Id. at 585-86, 260 S.E.2d at 242-43 (quoting Gorieb v. Fox, 145 Va. 554, 560, 134 S.E. 914, 916 (1926)). See also Village of Bell Terre v. Boraas, 416 U.S. 1, 4, 94 S.Ct. 1536, 1538, 39 L.Ed.2d 797 (1974) (characterizing the danger of the collapse of buildings as one of the historic problems, which the police power has been constitutionally invoked to redress). A legitimate exercise of the police power to regulate a property interest requires that "the means employed [must be] reasonably suited to the achievement of [the] goal." Alford, 220 Va. at 586, 260 S.E.2d at 243. For example, in the case of zoning regulations, in order for a zoning ordinance not to be deemed a taking for which "just compensation" must be paid by virtue of the fifth amendment, the ordinance must "substantially advance legitimate state interests" and must not deny an owner "economically viable use of his land." Agins v. City of Tiburon, 447 U.S. 255, 260, 100 S.Ct. 2138, 2141, 65 L.Ed.2d 106 (1980) (citations omitted).
The legislative purpose underlying the Virginia Uniform Statewide Building Code *214 (VUSBC) is to "protect the health, safety and welfare of the residents of this Commonwealth." Code § 36-99; see also VEPCO v. Savoy Const. Co., 224 Va. 36, 44, 294 S.E.2d 811, 817 (1982). The means selected to achieve this purposewhich are the substantive provisions of the USBC that set forth the minimal building standards as determined by the Board, with which all structures must comply, see, e.g., Section ES-302.0 et seq., Virginia Uniform Statewide Building Codeare reasonably suited to achieve and substantially advance the express purpose of the legislature in enacting the VUSBC. Moreover, the USBC does not deprive Rainey of economically viable uses of his property by requiring that it be maintained in compliance with the standards of the USBC. Consequently, because Rainey had no vested right to own and enjoy his property absolutely free from government interference, the retrospective application of the USBC does not violate his due process rights.

PERMISSIBLE SCOPE OF CONTEMPT SANCTIONS
The scope of the civil contempt sanctions imposed against Rainey was permissible. In civil contempt proceedings
"the punishment ... imposed is not limited to a fine and/or imprisonment.... In appropriate cases the violator may be punished by ... an award of damages against him in favor of the injured party sufficient to indemnify him for the pecuniary loss occasioned to him as a result of the act or omission which violated the injunction having injured or damaged property or rights which he was entitled to have protected or preserved by the injunction."
Leisge, 224 Va. at 308, 296 S.E.2d at 541 (quoting Deeds, 162 Va. at 262, 174 S.E. at 78-79). The punishment in a civil contempt proceeding "is adapted to what is necessary to afford the injured party remedial relief for the injury or damage done by the violation of the injunction to his property or rights which were under the protection of the injunction." Deeds, 162 Va. at 262, 174 S.E. at 78-79. Thus, in this context, appropriate sanctions include a fine or imprisonment, Leisge, 224 Va. at 308, 296 S.E.2d at 541, removal or alteration of improvements constructed pursuant to a mistakenly issued building permit, Segaloff v. City of Newport News, 209 Va. 259, 261-62, 163 S.E.2d 135, 137 (1968), ordering the owner of a building not in compliance with building code to turn over his keys and submit to an inspection or have the building demolished for his failure to purge himself of contempt, Borozny v. Paine, 122 R.I. 701, 705, 411 A.2d 304, 307 (1980), and ordering occupants to vacate buildings that do not comply with applicable building regulations, Lanski v. American National Bank & Trust Co., 122 Ill.App.3d 729, 731-32, 78 Ill.Dec. 488, 490-91, 462 N.E.2d 607, 609-10 (1984), or zoning ordinances, City of Long Beach v. California Lambda Chapter of Sigma Alpha Epsilon, 255 Cal.App.2d 789, 797, 63 Cal.Rptr. 419, 424 (1967).
As the sanction for Rainey's intentional refusal to comply, the trial judge authorized city employees to enter Rainey's property in order to make the necessary repairs that he had refused to do and authorized independent contractors, in the company of city representatives, to enter the property to determine the amount to bid for performing the repairs. The judge ordered Rainey to vacate the residence while the repair work was being performed and enjoined him from interfering with the work. The judge ruled that a judgment would be entered against Rainey for the costs of the repairs. These sanctions do no more than what was necessary to compel Rainey to comply with the code and to protect the City's rights, which the initial injunction was designed to accomplish. In fact, the most extreme of the sanctionsenjoining Rainey to vacate his residence while the repairs are being madeis reasonable and justified. First, Rainey had demonstrated obstreperous behavior throughout his dealings with the City. He had previously refused to allow city inspectors on his property to inspect the crawl space underneath his house and consistently objected to agents of the City coming onto his property. Rainey's own counsel *215 even requested a special admonition from the trial court to Rainey not to interfere with the repair process because he was "concerned about his intense determination that he's right in this matter and that [agents of the City] have no right to come upon his property." Thus, the trial court reasonably enjoined Rainey to vacate his home, based on evidence demonstrating that, were he to remain, he would likely interfere with the repair process. Moreover, the measure was also justified given the dangerous state of disrepair in which the court found the property. At the hearing, the court expressed the concern with which Rainey's counsel agreed in part, that Rainey's home might "fall down." The court, therefore, reasonably ordered Rainey to vacate the premises during the course of repairs in order to protect the workmen and in order to protect Rainey's safety. Consequently, the sanctions imposed were reasonable, appropriate and necessary to remediate the wrong occasioned by Rainey's violation of the injunction.

ATTORNEY'S FEES AND COSTS
Finally, Rainey argues that the trial court erred by denying his request for attorney's fees and costs. Pursuant to the "American rule," "attorneys' fees are not recoverable by a prevailing litigant in the absence of a specific contractual or statutory provision to the contrary." Lannon v. Lee Conner Realty Corp., 238 Va. 590, 594, 385 S.E.2d 380, 383 (1989). The trial court has no authority to award attorney's fees to a non-prevailing party in the absence of an express grant of authority. Consequently, we uphold the trial court's denial of attorney's fees. Furthermore, while a chancery court has discretion to award costs, Code § 14.1-177; Smith v. Woodlawn Constr. Co., 235 Va. 424, 431, 368 S.E.2d 699, 703 (1988), it has been held to be an abuse of that discretion if costs are not awarded to the party substantially prevailing. Id. We cannot say that the trial court abused its discretion in refusing to award costs to Rainey, the non-prevailing party. See Goodloe v. Woods, 115 Va. 540, 551, 80 S.E. 108, 113 (1913).
Accordingly, we affirm the trial court.
Affirmed.
NOTES
[1]  Pursuant to Code § 36-105 and Section 102.0, et seq., USBC, the City of Norfolk has adopted the USBC and has provided for its general applicability and enforcement in the City. See Norfolk City Code, §§ 1-1 et seq.
