
730 N.W.2d 551 (2007)
CITY OF MORRIS, Respondent,
v.
SAX INVESTMENTS, INC., Appellant, Michael Sax, Appellant.
No. A06-1188.
Court of Appeals of Minnesota.
May 1, 2007.
*552 Charles C. Glasrud, Morris City Attorney, Morris, MN, for respondent.
J. Richard Stermer, Prindle, Maland, Sellner, Stennes, Knutsen & Stermer, Chartered, Montevideo, MN, for appellants.
Considered and decided by SHUMAKER, Presiding Judge; KLAPHAKE, Judge; and WILLIS, Judge.

OPINION
KLAPHAKE, Judge.
In this temporary injunction action, appellant Michael Sax[1] challenges the district *553 court's grant of summary judgment to respondent City of Morris, arguing that the court erred by concluding that the Minnesota State Building Code, Minn.Stat. §§ 16B.59-.76 (2004) did not preempt the city's rental housing code, found at Morris City Code, Section 4.32 (1997).
Because we conclude that the state building code preempts matters of construction, remodeling, restoration, or alteration in residential housing, but does not preempt local authorities from creating and enforcing standards of habitability as they relate to the business of rental housing, we affirm.

FACTS
Appellant Michael Sax owns property located at 608 Eighth Street East in the City of Morris. This property is rental housing and thus subject to periodic inspections pursuant to Morris City Code, Section 4.32 (1997). This ordinance provides for registration and licensure of rental property in the city, with a stated purpose of "establish[ing] and enforce[ing] minimum standards for rental units to meet City and State safety, health, fire, and zoning codes within the City and to provide a more efficient system to ensure that rental property is properly maintained." To accomplish this purpose, the ordinance sets out a procedure for registering and licensing rental property, provides for periodic inspections, and details a number of rental property standards.
The city inspected the property on January 18, 2005, and noted eight deficiencies, which it ordered appellant to correct. The city conducted a re-inspection on March 25, 2005, and found that four of the deficiencies had been corrected, but four remained: (1) ground fault interruption receptacles were not installed for outlets within six feet of a water source; (2) the bathroom lacked a window or fan; (3) the basement bedrooms did not have smoke detectors; and (4) the egress windows in the basement lacked proper covers. In addition to setting a new deadline for correction of these problems, the city assessed a $50 inspection fee. Appellant argued that the four deficiencies are covered by the state building code and that he was not in violation of the state building code because the property was "grandfathered in" under the state rules.
Appellant refused to correct the cited problems or to pay the inspection fee. The city brought this action, seeking a temporary injunction preventing appellant from renting the property as residential housing until the problems were corrected and appellant paid the inspection fee. Appellant answered, asking the court to declare that (1) the property was deemed to have passed the inspection because the building was in compliance with the state building code; and (2) the state building code preempted the city's ordinance. Appellant also counterclaimed, asking that the court enjoin the city from enforcing any portion of the ordinance that conflicts with the state building code and to relieve appellant from an unrelated special assessment.
The district court denied appellant's motions and dismissed his counterclaim but granted summary judgment in favor of the city and issued a temporary injunction. The court noted that the parties "are in agreement that there are no disputed facts and that resolution of the issues would rest upon the Court's interpretation of the ordinance and its relationship to the State Building Code." The district court concluded that the state building code preempted local ordinances to the extent that they addressed the design or construction of *554 buildings, but that the city retained control of other issues not directly tied to building design or construction, including regulation of health and safety as it pertains to residential rental housing. The court limited its opinion to the four specific violations alleged by the city and refused to rule on the broader issue of whether any provisions of the ordinance might be preempted by the state building code.

ISSUE
Did the district court err by concluding that the state building code did not preempt certain provisions of the city's rental housing ordinance?

ANALYSIS
This court reviews de novo the district court's grant of summary judgment on undisputed facts as a question of law. Lefto v. Hoggsbreath Enters., Inc., 581 N.W.2d 855, 856 (Minn.1998). The narrow legal question here is whether the state building code preempts certain sections of the city's rental housing ordinance. Ordinances are presumed to be valid. Press v. City of Minneapolis, 553 N.W.2d 80, 84 (Minn.App.1996). The party challenging the ordinance bears the burden of proof. Id.
In Minnesota, a state statute preempts a local ordinance when the statute completely occupies a field of legislation so that there is no room for local regulation. Minn. Agric. Aircraft Ass'n v. Twp. of Mantrap, 498 N.W.2d 40, 42 (Minn.App.1993). In order to determine if a state statute has preempted a local ordinance, the court examines four questions:
(1) What is the subject matter being regulated?
(2) Has the subject matter been so fully covered by state law as to have become solely a matter of state concern?
(3) Has the legislature in partially regulating the subject matter indicated that it is a matter solely of state concern?
(4) Is the subject matter itself of such a nature that local regulation would have unreasonably adverse effects upon the general populace?
Canadian Connection v. New Prairie Twp., 581 N.W.2d 391, 394 (Minn.App.1998) (quotation omitted), review denied (Minn. Sept. 30, 1998). "The extent of the state's preemption is determined by the language of the statute." Minn. Agric. Aircraft Ass'n, 498 N.W.2d at 42.
The state building code, Minn.Stat. §§ 16B.59-76 (2004), contains specific preemptive language:
The State Building Code applies state-wide and supersedes the building code of any municipality. A municipality must not by ordinance or through development agreement require building code provisions regulating components or systems of any residential structure that are different from any provision of the State Building Code. . . . All municipalities shall adopt and enforce the State Building Code with respect to new construction within their respective jurisdictions.
Minn.Stat. § 16B.62, subd. 1 (2004). The actual code provisions are contained in Minn. R. 1300.0010-.0250 (2005). Minn. R. 1300.0030, subp. 2, reiterates that the code supersedes the building code of any municipality; subpart 1 states:
The purpose of the code is to provide minimum standards to safeguard life and limb, health, property, and public welfare by regulating and controlling the design, construction, quality of materials, use and occupancy, location and maintenance of all structures and equipment specifically covered by the code in a jurisdiction that adopts and enforces the code.
*555 In an opinion issued shortly after adoption of the state building code, the supreme court stated, "We hold that insofar as local ordinances purport to adopt fire prevention measures which affect the design and construction of buildings, they are in conflict with the State Building Code, which has preempted the field." City of Minnetonka v. Mark Z. Jones Assoc., Inc., 306 Minn. 217, 219, 236 N.W.2d 163, 165 (1975). In City of Minnetonka, the city sought to enforce a fire code that was more restrictive than the provisions of the state building code. The supreme court rebuffed the city's argument that firefighting was a function of local government that justified the more restrictive requirements.
We are of the opinion . . . that the State Building Code has dealt with fire prevention in a comprehensive manner insofar as it affects the design and construction of buildings, and that it was the legislature's intent that the state code preempt the requirements for fire prevention except as they dealt with matters other than construction. It would, undoubtedly, be within the province of local government to provide, by ordinance, fire prevention measures dealing with the use and storage of combustible materials, the number and location of portable fire extinguishers, limitations on occupancy of dwellings or commercial buildings, and similar regulations not directly related to the design or construction.
Id. at 320, 236 N.W.2d at 165. The supreme court noted that one of the purposes of the statute was to control construction costs in a manner consistent with standards of health and safety. Id. From the language of the statute and its interpretation in City of Minnetonka, it is clear that the answer to the first preemption factor is that the state building code seeks to regulate construction standards.
As to the second preemption factor, the state building code makes construction, alteration, and remodeling standards a matter solely of state concern, but does not regulate the use of a structure; in contrast, rental housing codes seek to regulate the use of a building as a business venture, by creating standards of habitability that must be met. See Camara v. Municipal Court, 387 U.S. 523, 534, 87 S.Ct. 1727, 1734-35, 18 L.Ed.2d 930 (1967) (opining that routine inspections of such structures are reasonable in order to enforce housing standards); see also City of Minneapolis v. Ellis, 441 N.W.2d 134, 137 (Minn.App. 1989) (affirming city's ordinance making landlords responsible for maintenance of rental property), review denied (Minn. July 12, 1989). The state also enacted Minn.Stat. §§ 504B.001-.471 (2004), which deals with the landlord/tenant relationship and imposes a duty on the landlord to maintain the premises in compliance with health and safety laws and with conditions imposed by statute and ordinance. Minn.Stat. § 504B.161, subds. 1, 4. This suggests that although the state intended to occupy the field of building codes as applied to construction, it did not intend to occupy the field of housing codes dealing with occupancy.
As to the third preemption factor, the state has not indicated that by regulating construction standards, it regards regulation of rental housing standards as a matter solely of state concern, except to the extent that the state building code applies to construction of rental housing.
Lastly, the local regulation of rental housing habitability would not adversely affect the general population. At most, the ordinance affects a narrow class of people, including renters or landlords, not the general population.
*556 The language of the state building code and supporting rules, as well as the supreme court's interpretation in City of Minnetonka, make it clear that local building ordinances are preempted because the state intends to fully occupy the field of building and construction regulations. But this language applies to construction, remodeling, alteration, or restoration, that is, to the act of building, and not to the subsequent use of the building as a business. The supreme court noted that "limitations on occupancy of dwellings or commercial buildings" are fit subjects for local control. City of Minnetonka, 306 Minn. at 219, 236 N.W.2d at 165. Local authorities retain the right to regulate the business of rental housing by enacting standards of habitability. We therefore conclude that the district court did not err by determining that the state building code did not preempt those parts of the city's rental housing ordinance at issue here.[2]

DECISION
The state building code preempts local attempts to regulate construction, alteration, remodeling, and restoration of residential housing but does not preempt local authorities from creating and enforcing habitability standards in rental housing.
Affirmed.
NOTES
[1]  Appellant Sax Investments, Inc. transferred title to the subject property to appellant Michael Sax on January 3, 2005, before the city of Morris commenced this action. Michael Sax is now the sole owner of the property and shall be referred to as "appellant."
[2]  Appellant argues that the district court erred by addressing only the four deficiencies for which he was cited, rather than all provision of the city's ordinance. As a general rule, courts decide only actual controversies and avoid giving advisory opinions. N. States Power Co. v. City of Sunfish Lake, 659 N.W.2d 271, 274 (Minn.App.2003). We decline to address the remaining 71 provisions of the city's ordinance.
