
257 Cal.App.2d 375 (1967)
BERT A. GRANT, as Administrator, etc., Plaintiff and Appellant,
v.
MORRIS HIPSHER et al., Defendants and Respondents.
Civ. No. 8358. 
California Court of Appeals. Fourth Dist., Div. Two.  
Dec. 22, 1967.
 Wendell V. Harris for Plaintiff and Appellant.
 Thompson & Colegate and Arthur W. Kelly, Jr., for Defendants and Respondents.
 TAMURA, J.
 This is an action for the wrongful death of a 3 1/2-year-old girl who died by drowning in a swimming pool maintained on the premises of a residence owned by defendants but occupied by their tenant.plaintiff, the child's father and administrator of her estate, appeals from a judgment entered on a jury verdict for defendants.
 The principal issue is whether the trial court erred in withholding from the jury the question whether defendants violated the provisions of a county ordinance requiring premises on which a swimming pool is situated to be fenced and access gates to be self-closing and self-latching.
 The complaint alleged two causes of action: The first alleged *378 in substance that defendants were negligent in opening the gate and leaving it unattended; the second charged that defendants negligently "maintained, used, controlled and supervised" the pool. In the joint pretrial statement incorporated in the pretrial order, however, the parties agreed that the issues to be tried were negligence of the defendants, contributory negligence and damages.
 The evidence relating to the issues to be resolved on this appeal may be summarized as follows:
 Defendants were in the business of building and acquiring houses and apartments and renting them. They rented the premises in question to Mr. and Mrs. Holland about two to two-and one-half years prior to the date of the accident at which time the swimming pool was in existence but was not being used and had not been used for several years. The pool was approximately 18' by 22' and 3 1/2' deep. The premises were completely enclosed by a chain link fence with two access gates, one leading to the driveway and one leading to the front of the house, neither of which was self-closing and self-latching.
 As soon as the Hollands moved in they installed a fence separating the backyard from the rest of the premises and an additional gate to provide access to the backyard from the driveway, the only other access to the backyard being through the back door of the house. Defendants provided scrap lumber for the fence and Mr. Holland constructed the gate from an old plywood trailer gate. That gate was not self-closing and self-latching. Following completion of the additional fencing the Hollands filled the pool and used it. Through periodic visits to the premises to do maintenance work and to collect rentals, defendants knew that the Hollands were using the pool.
 A day before the accident, in response to Mrs. Holland's complaint that the drain appeared to be stopped, defendant Morris Hipsher went to the premises to check the cesspool which was in the backyard and determined that it had to be pumped. The following morning at 8 or 8:30 a.m. he arrived at the premises with his employee. He testified that Mrs. Holland opened the gate to the backyard by unfastening a chain which secured it. Defendant Hipsher and his employee entered the backyard, uncovered the cesspool so it could be pumped, and left sometime between 10 to 10:30 a.m. He testified that on leaving his employee closed the gate and secured it with the chain and that at that time there were no children in the backyard. *379
 Mrs. Grant, the deceased child's mother, resided across the street from the Holland residence in a house also owned by defendants. About 10:15 that morning Mrs. Grant arrived at the Holland residence. When she left her house her three children were playing in the yard of her home and they could be seen from the Holland home. About 10 minutes after she arrived plaintiff observed her children go into her house and being concerned that they might awaken an infant who was in bed, she returned home. She testified that she was unable to find decedent so she went back to the Holland residence to look for her; that the gate to the backyard was open; that she saw an excavation, presumably the one caused by the uncovering of the cesspool, and went to it thinking that her child might be in it; that at this point she heard Mrs. Holland scream from the backyard so she rushed there and saw her child unconscious in the swimming pool. Attempts to revive the child were unsuccessful.
 [1] [See fn. 1]plaintiff contends that by the following rulings the court erroneously withheld from the jury's consideration the question whether defendants were negligent in failing to comply with the county ordinance: (1) By precluding plaintiff's counsel from making any reference to the ordinance in his opening statement to the jury; (2) by granting a motion for a "nonsuit" as to the second cause of action charging negligent maintenance of the swimming pool  [fn. 1]; and (3) by refusing to give plaintiff's proposed instruction informing the jury of the provisions of the ordinance and instructing it that a violation thereof constituted negligence as a matter of law.
 It is apparent that by the rulings complained of the court eliminated from the case the question of whether the defendants were negligent in failing to comply with the ordinance. Thus, the decisive issue is whether, under the evidence viewed most favorably to plaintiff, the law imposed on defendants as *380 owners the duty to comply with the ordinance. (Cf. Estate of Jamison, 41 Cal.2d 1, 6 [256 P.2d 984].)
 [2] [See fn. 2] Although the ordinance does not appear to have been offered in evidence both parties agree that its relevant provisions are correctly set forth in plaintiff's proposed instruction which reads as follows:  [fn. 2]
 "Ordinance No. 804 of the County of San Bernardino, State of California provides as follows:"
 "(a) No person in possession of land within the County of San Bernardino, either as owner, purchaser under contract, lessee, tenant, licensee or otherwise, upon which is situated a swimming pool or other out-of-doors body of water designed, constructed and used for swimming, dipping or immersion purposes by men, women or children, having a depth in excess of eighteen (18) inches, shall fail to maintain on the lot or premises upon which such pool or body of water is located and completely surrounding such pool or body of water, a fence or wall not less than four (4) feet in height, with openings, holes or gaps therein no larger than four (4) inches in any dimension except for doors or gates; provided, however, that if a picket fence is erected or maintained the openings or spaces between the pickets shall not exceed four (4) inches; provided, further, that a dwelling house or accessory building may be used as a part of such enclosure."
 "(b) All gates or doors opening through such enclosure shall be equipped with a self-closing and self-latching device designed to keep, and capable of keeping, such door or gate securly closed at all times when not in actual use; provided, however, that the door of any dwelling occupied by human beings and forming any part of the enclosure hereinabove required need not be so equipped. *381"
 "A further requirement of said ordinance is that the gate mentioned therein must be kept securely closed at all times when not in actual use."
 "If you should find from the evidence that a party to this action conducted himself in violation of San Bernardino County Ordinance No. 804 just read to you, you are instructed that such conduct constituted negligence as a matter of law."
 Defendants contend that the ordinance did not impose upon them any duty of compliance because (1) after the premises were let to the Hollands defendants were not "in possession" and (2) before the premises were rented the swimming pool was not being used.
 We have concluded that those contentions may not be sustained.
 [3] Subject to certain exceptions a lessor is not exposed to common law liability to persons injured on the demised premises by reason of conditions which develop after possession has been transferred to the tenant. (Mundt v. Nowlin, 44 Cal.App.2d 414 [112 P.2d 782]; see Finnegan v. Royal Realty Co., 35 Cal.2d 409, 428 [218 P.2d 17]; Prosser, Torts,  63, p. 412.) The liability which plaintiff seeks to impose, however, is based on a claimed violation of an ordinance designed for the protection of a class of persons of whom the deceased child was a member and not upon the breach of a common law duty of the lessor. (Finnegan v. Royal Realty Co., supra, 35 Cal.2d 409, 423; Porter v. Montgomery Ward & Co., Inc., 48 Cal.2d 846, 849 [313 P.2d 854]; see Kasunich v. Kraft, 201 Cal.App.2d 177 [19 Cal.Rptr. 872].)
 [4] Where an owner leases a building knowing it is to be used for a purpose which would require structural changes in order to comply with safety regulations, the duty to comply with those regulations is upon the owner. (Finnegan v. Royal Realty Co., supra, 35 Cal.2d 409, 423; Longway v. McCall, 181 Cal.App.2d 723, 729 [5 Cal.Rptr. 818]; Roxas v. Gogna, 41 Cal.App.2d 234, 239 [106 P.2d 227]; see McNally v. Ward, 192 Cal.App.2d 871, 876 [14 Cal.Rptr. 260].) [5] And where a tenant makes a structural change which is in violation of safety regulations and the owner has knowledge of the change, a duty is imposed upon the owner to terminate the tenancy or compel the tenant to comply with the regulations. (Finnegan v. Royal Realty Co., supra; Longway v. McCall, supra.)
 While the cases in which the foregoing principles were *382 enunciated involved structural aspects of a building whereas the present case involves the fencing of a swimming pool, we perceive no rational basis for holding the distinction to be of controlling significance. [6] A fence enclosing a swimming pool is as much a part of the permanent improvements of the demised premises as the exit door or the sprinkler system involved in Finnegan v. Royal Realty Co., supra, 35 Cal.2d 409, and the extent of the lessor's duty to see that such improvements conform to applicable safety ordinances should be no less.
 In the present case defendants not only had knowledge of the installation of the additional fence and gate, it may be reasonably inferred that they required it. They furnished the scrap lumber for the fence and defendant Morris Hipsher told the Hollands that "they have to have a gate."  [fn. 3] The evidence was undisputed that the gate installed by Mr. Holland was not self-closing and self-latching as required by the ordinance.
 [7] Assuming, as defendants contend, that the duty to comply with the ordinance rested initially with the tenant, defendants having not only knowledge of the alteration but having required it were under a duty either to require compliance with the ordinance or to terminate the tenancy. (See Finnegan v. Royal Realty Co., supra, 35 Cal.2d 409, 422, 427; Longway v. McCall, supra, 181 Cal.App.2d 723, 729.) It may be reasonably inferred that the tenancy was on a month-to-month basis and that defendants retained the power to terminate the tenancy on 30 days' notice.  [fn. 4] There was thus sufficient evidence from which a jury could have found that defendants violated the ordinance by knowingly permitting the swimming pool to be maintained in violation of the county ordinance while retaining the power to terminate the tenancy or to require compliance. (Finnegan v. Royal Realty Co., supra, 35 Cal.2d 409, 427.)
 [8] Moreover there is evidence that at the time the premises were initially rented to the Hollands, the swimming pool *383 was then maintained in violation of the ordinance. Although the premises were then completely enclosed by a chain link fence, it was undisputed that the access gates were not self-closing and self-latching. Defendants were then the owners in possession and under the ordinance the duty of compliance was clearly upon them. The act of renting the premises and putting the Hollands in possession did not relieve them of that duty. (See Dennis v. City of Orange, 110 Cal.App. 16, 23-24 [293 P. 865]; Burroughs v. Ben's Auto Park, Inc., 27 Cal.2d 449, 455 [164 P.2d 897]; Prosser, Torts, supra,  63, pp. 414-415; Harper, Torts,  102, p. 232.)
 [9] Defendants contend that the ordinance was inapplicable at the time they rented the premises to the Hollands because the swimming pool was not then in use and had not been used for several years. The ordinance applies to premises "upon which is situated a swimming pool or other out-of- doors body of water designed, constructed and used for swimming. ..." Defendants read the phrase "designed constructed and used for swimming. ..." as modifying not only the words "other out-of-doors body of water" immediately preceding it but also the words "swimming pool." A modifying phrase is ordinarily to be read as applying only to the last antecedent and not to more remote words and phrases unless the context or natural construction of the language used otherwise requires. (Elbert, Ltd. v. Gross, 41 Cal.2d 322, 326-327 [260 P.2d 35]; County of Los Angeles v. Graves, 210 Cal. 21, 26 [290 P. 444]; Watkins v. Real Estate Comr., 182 Cal.App.2d 397, 399 [6 Cal.Rptr. 191]; City of Santa Barbara v. Maher, 25 Cal.App.2d 325, 327 [77 P.2d 306].) In the present case the application of that rule leads to a construction consistent with the obvious intent of the ordinance. To treat the phrase as modifying the words "swimming pool" would make the word "swimming" redundant. Such a construction should be avoided. (Watkins v. Real Estate Comr., supra, p. 400.)
 To adopt the narrow construction of the ordinance as urged by defendants would be contrary to the trend of recent decisions which impose on a lessor who rents defective premises not complying with statutory safety standards the duty to repair, recognizing that the tenant may be financially unable to make the necessary repairs (Prosser, Torts, supra, p. 413) or would be less likely to do so because of his "transitory interest" (see McNally v. Ward, supra, 192 Cal.App.2d *384 871, 878.) and that the burden should be on the landlord who derives benefits from the tenancy in the form of rentals.
 We conclude that the question whether defendants were negligent in maintaining the swimming pool in violation of the county ordinance was a proper issue and that its erroneous elimination from the case requires reversal.
 [10] Plaintiff also complains that the court erred in sustaining an objection to the following statement allegedly made by defendant Hipsher to the child's grandmother several days after the accident. "Go ahead and sue me. I am insured up to $25,000, but I hope she will settle out of court. It will be better for Nancy." The court's ruling was correct. The statement cannot be reasonably construed as an admission of liability; it merely expressed a hope that the matter would be compromised. An offer of compromise and negotiations in relation thereto are not admissible. (Armstrong v. Kline, 64 Cal.App.2d 704, 714-715 [149 P.2d 445]; Witkin, Cal. Evidence [2d ed. 1966]  378, p. 336.)
 Since the case must be reversed, we need not consider plaintiff's remaining contentions.
 Judgment reversed.
 McCabe, P. J., and Kerrigan, J., concurred.
 "Q [Mr. Harris] Now, after you rented the premises to the Hollands, did they build a fence?"
 "A They build a gate for they want to use the swimming pool. I told them they have to have a gate, but I didn't charge them anything for the swimming pool."
 "Q You didn't charge them anything for the swimming pool?"
 "A For the swimming pool. I just rent them the house."
 "Q The swimming pool was on the premises you rented to them?"
 "A That's right."
NOTES
[fn. 1]  1. The court purported to grant a nonsuit but it is settled that a nonsuit may not be granted as to a particular issue in a cause of action. (Estate of Jamison, 41 Cal.2d 1, 6 [256 P.2d 984]; American Aeronautics Corp. v. Grand Central Aircraft Co., 155 Cal.App.2d 69, 85 [317 P.2d 694]; 2 Witkin, Cal. Procedure (1954)  123, pp. 1855-1856.) Though separately stated in the complaint, there was only one cause of action; namely, that based on negligence of defendants. Negligence arising out of an alleged violation of the ordinance was not a severable cause of action on which a nonsuit could be properly granted. In these circumstances, the order granting the "nonsuit" will be treated, not as a true nonsuit, but simply as an order determining that there was no evidence to show that defendants violated the ordinance so as to justify submission of that issue to the jury.
[fn. 2]  2. The cause of action being based upon negligence, plaintiff was not required to plead the ordinance (Opitz v. Schenck, 178 Cal. 636, 638 [174 P. 40]; Jackson v. Hardy, 70 Cal.App.2d 6, 12 [160 P.2d 161]; Thompson v. Guyer-Hays, 207 Cal.App.2d 366, 373 [24 Cal.Rptr. 461]), but since at the time of trial neither the superior courts or appellate courts took judicial notice of the contents of a city or county ordinance (Simpson v. City of Los Angeles, 40 Cal.2d 271, 277 [253 P.2d 464]; South Shore Land Co. v. Petersen, 226 Cal.App.2d 725, 746 [38 Cal.Rptr. 392]; Thompson v. Guyer-Hays, supra, p. 373. For present rule see Evid. Code,  452, subd. (b).) normally it would have been necessary for plaintiff to have offered to prove the contents of the ordinance before he could complain on appeal of the court's rulings with reference thereto. Where, however, as in the present case, it would have been futile to offer the ordinance in evidence, such offer is excused. (Caminetti v. Pacific Mut. Life Ins. Co., 23 Cal.2d 94, 100 [142 P.2d 741]; Lawless v. Calaway, 24 Cal.2d 81, 91 [147 P.2d 604].)
[fn. 3]  3. Defendant Morris Hipsher testified as follows:
[fn. 4]  4. Defendant Morris Hipsher testified that he went to the premises at least once a month or every few weeks to collect rent.
