
137 Cal.App.2d 5 (1955)
FRED McNEILL et al., Respondents,
v.
A. TEICHERT AND SON, INC. (a Corporation) et al., Appellants.
Civ. No. 8551. 
California Court of Appeals. Third Dist.  
Nov. 15, 1955.
 Desmond, McLaughlin & Russell and William A. Sitton for Appellants.
 Richard J. Lawrence for Respondents.
 VAN DYKE, P. J.
 The city of Sacramento, herein called the "city," and A. Teichert and Son, Inc., herein called the "corporation," appeal from a money judgment entered against both upon a jury verdict in a personal injury action.
 The accident which gave rise to the litigation occurred in a residential tract in the city of Sacramento known as "Tallac Village." The corporation had been installing storm sewers in the area under a contract awarded to it by the city. In order to lay the necessary pipes, the corporation had dug a ditch 9 feet deep and 3 1/2 feet in width down the center of 25th Avenue from 59th Street for approximately one-half mile. About one month before the accident the pipes had been laid and the ditch backfilled with dirt except for a portion about 25 feet in length in which pipes could not then be laid due to an accumulation of water at that point. Work was halted and the excavation was left unfilled. That condition had existed for about one month before the accident, and during that time no barriers had been erected and maintained about the open ditch save that there was placed at one end of the excavation a sign reading, "Road Closed"; and there was an embankment composed of the dirt that had been taken from the excavation and piled on the side. Pipes lay along one side of the pile of dirt. The corporation, while it had been engaged in construction work in the area, had requested teachers of adjacent schools and parents living in the area to caution school children of the dangers existing at its construction sites. Plaintiff and respondent Ronald *7 McNeill, who was then 6 1/2 years of age, had been so warned. Prior to the time of the accident, to which there were no eyewitnesses, he had not been near the open segment of ditch, which was two or three blocks distant from his home. However, on the afternoon of the day of the accident, after returning from school and changing his clothes, he was attracted by the pile of dirt and rode his bicycle down to the site. He testified as follows: "I just saw all the dirt down there and I thought I would ride down, and I rode down there and got scared and fell in." He further said: "I just looked in, and then I tried to get away, and then I fell in." Ronald's father, for himself and as guardian ad litem for his child, brought this action to recover damages for the personal injuries sustained by Ronald and for the recovery of medical and hospital expenses incurred on his behalf. The complaint contained two counts, one against the city and the other against the corporation. Against the city, the plaintiffs alleged that it was a municipal corporation and as such charged with the duty of keeping streets within its borders in safe and suitable condition for use by the public; that Ronald had fallen into the excavation above described at a time when there were no barriers or warning signs placed near it to warn of the condition of the street which it is alleged was at that time dangerous and defective. It was charged that the city and its superintendent of streets had notice and knowledge of the condition and the consequent dangers therefrom in time to remedy said conditions prior to Ronald's fall and that the condition had been left uncorrected. It was alleged that the injuries to Ronald were proximately caused by the dangerous condition of the street. The count against the city also contained allegations that the corporation, as a contractor, had been installing storm sewers pursuant to a contract with the city; that a city inspector had been charged with the duty to inspect the work daily; that the contractor was bound by its contract to provide, during the course of its work, and to maintain, in proper location, all necessary signs, barriers, guards, etc., to protect the public; and that the street superintendent and the inspector had been negligent in failing to require the contractor to do so. By a second count a cause of action was stated against the corporation. It was alleged that its acts in leaving open the excavation had been negligent and that this negligence had proximately caused the injuries to Ronald, for which this action was brought. *8
 There was evidence that although cross barriers had been maintained during the progress of the work so that the public could not travel upon the street where the excavation existed, these barriers had been removed when the work was halted and the uncompleted segment of ditch left open; that during the time it was left open, prior to the accident, the public used the street and school children traversed it to and from school. The answers of defendants raised the general issue and pleaded the affirmative defense of contributory negligence on the part of Ronald. The jury returned a verdict of $5,000 for general damages and $515.25 for medical expenses incurred. There is no claim that the verdict is excessive.
 Appellants contend that, although the contributory negligence of Ronald was, in view of his tender age, a question of fact for the jury, nevertheless his conduct as a matter of law was the sole cause of the accident and that, therefore, they are not liable for the injuries he suffered. This contention cannot be sustained. [1] On the question of proximate cause, it was for the jury to determine whether or not the condition of the street was a proximate cause of Ronald's injuries. The jury could have reasoned that if barriers had been placed along the side of the ditch they might have so impressed the young child that he would not have gone near to and fallen into the excavation. (Hines v. Milosivich, 68 Cal.App.2d 520, 522 [157 P.2d 45].) The trial court did not err in submitting the issue of proximate cause to the jury.
 Both appellants contend that the court erred in admitting in evidence a city ordinance which was in force and effect at the time of the accident and which reads as follows:
 "Any person by whom, or under whose direction, or by whose authority as principal, or as contractor or employer, any portion of a public street, sidewalk, or alley may be made dangerous, shall erect, and so long as the danger may continue, maintain, around or over the place so made dangerous, a good substantial barrier, or walk which said barrier or walk shall be constructed in such a manner that it shall meet with the approval of the Building Inspector."
 We will treat first of the contention of the corporation that the ordinance was inadmissible in proof of plaintiffs' cause of action against it. This contention cannot be sustained. [2] Appellant argues that the ordinance had not been pleaded and that it had objected to its introduction upon that basis; that the court overruled the objection, expressing the opinion that it appeared to the court it was not necessary *9 to plead the ordinance because it was admissible under the general issue of negligence raised by the pleading. In so ruling the court was correct. We quote the following from Jackson v. Hardy, 70 Cal.App.2d 6, 12 [160 P.2d 161]:
 "Answering appellants' contention that general negligence was charged in the complaint, we point out that under our system of pleading, it is unnecessary to plead or refer to a statute relied upon as creating a duty, where the action is one predicated upon the negligence of the defendant and not one to enforce a liability or penalty imposed by statute."
 We also refer to Martin v. Shea, 182 Cal. 130, 137 [187 P. 23], where, in quoting from the case of Cragg v. Los Angeles Trust Co., 154 Cal. 663, 669 [98 P. 1063, 16 Ann.Cas. 1061], the court said:
 "The ordinance hereinbefore referred to was not alleged in the complaint, plaintiff simply alleging negligence in the manner we have specified. It is urged that it was necessary to plead the ordinance in order to make it available as evidence and that the trial court therefore erred in admitting it over the objections of defendant. The precise question thus presented appears never to have been decided by this court, but it appears to us that, upon elementary principles, it was admissible without having been pleaded. The cause of action here alleged was not a violation of the ordinance, but the negligence of the defendant, and the ordinance was simply evidence offered to show such negligence. Under our system of pleading, it is both unnecessary and improper to plead the evidence relied on to establish the ultimate facts essential to a cause of action."
 [3] As the corporate appellant says, courts do not take judicial notice of ordinances and for that reason, we add, it was proper for the respondents to introduce the ordinance in evidence in proving that the standard of care thereby fixed had been violated, all as a part of proving the alleged negligent conduct of said defendant.
 [4] The appellant city also contends that it was error for the court to introduce the ordinance as against it and relies upon such cases as Owen v. City of Los Angeles, 82 Cal.App.2d 933, at page 942 [187 P.2d 860], and Wilkerson v. City of El Monte, 17 Cal.App.2d 615, at page 624 [62 P.2d 790]. As we read the count against the city in plaintiffs' complaint, although it does contain some allegations of negligent conduct on the part of the city, yet it specifically bases the prayer for recovery upon the public liability statute which it alleges *10 the city was subject to. To recover against the city it was not necessary to prove general negligence, it was only necessary to prove the dangerous or defective condition of the street, knowledge thereof, express or implied, on the part of the city and its responsible employees, opportunity after knowledge to repair, and failure to repair, and that the condition of the street proximately caused the injuries to plaintiff. Perhaps it would have been better if the trial court had instructed the jury specifically as to the limited purpose for which the ordinance was admissible. However, we do not think that the error would justify the reversal of the judgment against the city. The jury were told expressly that before they could bring in a verdict against the city, the requirements of the Public Liability Act would have to be squarely met and that they could not bring in a verdict on any other theory than one contained within the provisions of that statute. No doubt these limitations were argued to the jury and we think it fair to assume that the jury understood them. Generally, the cases such as the two referred to above which hold the introduction of an ordinance of this type in evidence to be erroneous in a suit against a public agency, are cases wherein that agency alone has been sued. Even if we assume that error was committed as against the city, we could not reverse because of it.
 The corporation further contends that, even assuming that as against it the ordinance was properly before the jury, there was no evidence of a violation of its terms. This we think is not a sound contention. We think it apparent from what we have already said that the jury could have found the corporate appellant was guilty of violating the ordinance in that it did not better protect the excavation, or in other words that it did not erect the sort of barrier about the excavation which the ordinance required.
 The city contends that the trial court committed prejudicial error in that it gave to the jury conflicting instructions with respect to municipal liability. To lay a foundation for its claim of conflict, the city refers to an instruction given, apparently of the court's own motion, which is taken from BAJI, Number 53. It reads as follows:
 "While there are two defendants in this action, it does not follow from that fact alone that if one is liable, both are liable. Each is entitled to a fair consideration of his own defense and is not to be prejudiced by the fact, if it should become a fact, that you find against the other. The instructions given you govern the case as to each defendant, to *11 the same effect as if he were the only defendant in the action, and regardless of whether reference is made to defendant or defendants in the singular or plural form."
 [5] The city emphasizes the last sentence in the instruction and interprets it as telling the jury that each and every instruction given is applicable to both defendants. We do not so construe it. By the instruction, the court is cautioning the jury that there are two defendants in the action, and that they are not both to be held liable merely because one may be; that each is entitled to have its case determined independently and without prejudice by what may be done with the case of the other; that the jury must apply instructions to each defendant, which are applicable to such defendant, without regard to the other defendant. The last sentence cannot, in view of the instructions given, be construed as telling the jury that each and every instruction is applicable to each defendant. To do so would make it impossible to harmonize this instruction with many of the instructions given, which must be done where reasonable. (Bates v. Newman, 121 Cal.App.2d 800, 807-808 [264 P.2d 197].) The instructions given show that many of them are applicable to one defendant and not to the other. For instance, we will take the instruction concerning the city's liability under the Public Liability Act. The court told the jury:
 "Plaintiffs' cause of action, if any they have, against the defendant City of Sacramento is based upon, and must meet the requirement of, a law of this state known as the Public Liability Act. That act provides as follows: [Here the instruction quotes from the act.]"
 "The law just read to you is the only authority under which this action can be maintained, if at all, against the defendant City of Sacramento; and it follows that before the plaintiffs or either of them may be entitled to your verdict, you must find from a preponderance of the evidence:"
 "First: That plaintiffs, or either of them, suffered an injury from which a proximate cause was some dangerous or defective condition of 25th Avenue which the City at the time and under the conditions had authority to remedy."
 "Second: That before the accident in question, the governing or managing board of said City of Sacramento, or whatever Board, officer or person was authorized to remedy the alleged dangerous or defective condition, had knowledge or notice thereof."
 "Third: That before the accident in question, such board, *12 officer or person had a reasonable time, after receiving such notice, to remedy the condition or to take such action as was reasonably necessary to protect the public against it, and it failed to do either."
 There are other instructions applying specifically and only to the corporation. Pursuing its thesis of conflicting instructions, the city calls attention to instructions as follows: (1) An instruction that it is necessary to exercise greater caution for the protection and safety of a young child than for an adult person. We agree that this instruction has no application to the city. For the city's liability as stated in the instruction specifically addressed to that subject, and from which we have quoted, is not based upon the ordinary concept of common law negligence. (2) An instruction that violation of the ordinance introduced in evidence constituted negligence per se. For the reason just given before, this has no application to the city. (3) An instruction that the fact that the corporation had placed a sign on the street stating that it was closed did not relieve it from complying with the ordinance. We do not think from this record that the jury could have considered that the foregoing instructions had any application to the case of the city in view of the specific instruction which stated the exact limits of the city's liability and the exact requirements that the plaintiffs must meet before a cause of action against the city was proved.
 [6] Certain instructions were given which, on their face, applied to the city, and they should not have been given. We refer to an instruction that if the city's superintendent of streets negligently failed to require the corporation to perform its contract in accordance with plans and specifications and with the requirement of Ordinance Number 258 in evidence requiring the placing of barriers, and if, as a proximate result of said superintendent's negligence and carelessness in failing to require such performance by the corporation, the plaintiff had suffered damage, the verdict of the jury should be against the city. There was yet another instruction along the same line as the one just referred to in which the court told the jury that it was the duty of the city superintendent of streets to require the corporation to comply with the terms of its contract. Again, the court told the jury that the digging of the ditch by the corporation was done under the direction of the city superintendent of streets. It was error to give these instructions, for the city's liability could not be predicated upon any negligent conduct of its engineer in failing in the performance of any assumed duty *13 to compel the corporate defendant to remedy the dangerous condition of the street. However, we do not believe that the instructions were prejudicial for these reasons. In order to find the corporation guilty of actionable negligence in the count against it, the jury had to find that it had left the excavation in the street unguarded, and had thus set up a condition dangerous to users of the street; that without contributory fault on his part plaintiff Ronald McNeill had fallen into the excavation and been injured; that the negligence of the corporation in these matters was a proximate cause of the injuries which Ronald suffered. The jury made these findings by implication and there was ample evidence to support them. To find against the city, the jury had to find that the excavation created a danger so long as it was left unguarded and that this dangerous condition was a proximate cause of plaintiff's injuries. The only additional findings that it had to make against the city, and that it did not have to make against the corporation, were the findings as to the notice and as to the lapse of time after notice, that is, as to a reasonable time for, and the lack of, repair. The jury made these findings. The finding of notice was based upon direct testimony that the responsible city officials had knowledge of the existence of the dangerous condition in the city streets for much more than ample time to cause it to be remedied or to remedy it itself as was its duty. All this being so, we think the jury, having found against the corporate defendant, would also have found against the city, and that such finding was not brought about by the erroneous instructions that the city could be held liable by reason of the negligence of its city superintendent in failing to compel the corporate defendant to remedy the defect that created the danger to those who might use the city's street. The evidence in this case is such that we think it impossible to suppose the jury would hold the corporate defendant liable and release the city. We feel sure from the whole record that the verdict was not caused or contributed to by the erroneous instructions.
 The judgment appealed from is affirmed.
 Peek, J., and Schottky, J., concurred.
