delivered the opinion of the court.
In February, 1911, the Whitney-Steen Company was engaged in erecting a tower for the Daniels & Fisher Stores Company in Denver. An elevator shaft through which a hoist was operated for carrying materials used in the work, was constructed from the basement to the 23rd floor, in the tower. The well holes or openings on the different floors through which the elevator passed, were not protected by any fence or barrier, and the cage or elevator was simply a platform.
On the morning of February 7, 1911, McLennon, a carpenter, and Dixon a fellow workman were preparing forms for concrete on the 18th floor, and later McLennon went to the. 19th floor to do some work around the hoist shaft, when he got 'down on his knees, and in reaching over to take a measurement, leaned his head and part of his body out into the shaft. The floors are only nine feet apart, and the cage was standing directly above him at the 20th floor. While he was in this position, Anderson, foreman of the brick layers, got on the elevator to go to the basement, and while descending, it struck McLennon on *570the back of the head, as he was leaning over into the shaft, thereby inflicting serious and permanent injuries.
The acts of negligence alleged in the complaint as causing the injuries, are: Failure to fence around the ele-
vator shaft as required by the Denver City ordinance; and that Anderson, who was riding on the elevator, should have seen plaintiff and avoided the accident.
At the close of plaintiff’s evidence, the court non-suited him upon the grounds: that regardless of the condition of the elevator shaft, and the ordinances of the city, he was guilty of contributory negligence in projecting his body out into the elevator shaft, and that the injuries would not have occurred except for such negligent act of plaintiff.
The ordinance provides:
“Hoists and Elevators — Well Holes to be Guarded.
All buildings in course of construction, and in all buildings having elevators intended for freight lifts only, and not constructed, protected and operated as required for passenger elevators, it shall be unlawful to use hoists and elevators for hoisting materials, etc., in any such building or buildings, unless the well holes or openings for such elevators or hoists, on each and every floor of the building, shall be closed with guard rails composed of boards placed six (6) inches apart, to a height of five (5) feet, with a gate or door-way swinging outward from the elevator, and such other safety or equivalent appliances as shall be necessary for the protection of life and limb.”
The case is brought here to review the judgment of the lower court.
1. The question regarding Anderson’s failure to see plaintiff, or to anticipate that he would be' in his perilous position, is not difficult. The answer to that contention is, that Anderson was on top of the cage and plaintiff out of sight underneath it.
2. Plaintiff as a basis of his cause of action, relies upon the violation of the city ordinance, which is admitted. This involves the consideration of two questions: First, con*571tributory negligence as a defense; and, second, the limitation, if any, placed upon this defense by the city ordinance, that is, can this defense be relied upon when the negligence of the employer consists merely in the violation of a city ordinance. The simplest and most logical way of disposing of these questions, is to state three general rules of law applicable to the undisputed facts:
(1) The general rule relating to the doctrine of contributory negligence of employes as applicable to the facts in this case, is well stated in counsel’s brief, as follows: .
“An employe is guilty of contributory negligence, which will defeat his right to recover for injuries sustained in the course of his employment, when such injuries substantially resulted from danger so obvious and threatening’ that a reasonably prudent man, under similar circumstances, would have avoided them if in his power to do so.”
“Or, to state the proposition in another way: To render a master liable for injuries to his servant, the latter must have exercised ordinary and reasonable care, and if the injured party might, by the exercise of ordinary and reasonable care under the circumstances, have avoided the consequence of defendant’s negligence, he cannot recover.”
See Behrens v. Railway Co., 5 Colo. 400; Lord v. Pueblo S. & R. Co., 12 Colo. 390, 21 Pac. 148; Jackson v. Crilly, 16 Colo. 103, 26 Pac. 331; Railway Co. v. Ryan, 17 Colo. 98, 28 Pac. 79; Last Chance Co. v. Ames, 23 Colo. 167, 47 Pac. 382; Iowa G. M. Co. v. Diefenthaler, 32 Colo. 391, 76 Pac. 981; Orphan Belle Co. v. Pinto M. Co., 35 Colo. 564, 85 Pac. 323 ; Union C. & C. Co. v. Sundberg, 36 Colo. 8, 85 Pac. 319; Western Union Co. v. Olsson, 40 Colo. 264, 90 Pac. 841; Elkton Co. v. Sullivan, 41 Colo. 241, 92 Pac. 679; Sagers v. Nuckolls, 3 Colo. App. 95, 32 Pac. 187; Acme Co. v. McIver, 5 Colo. App. 267, 38 Pac. 596; Hough v. Railway Co., 100 U. S. 213, 25 L. Ed. 612; Northern P. R. Co. v. Herbert, 116 U. S. 642, 6 Sup. Ct. 590, 29 L. Ed. 755; Goodlett v. Louisville Ry., 122 U. S. 391, 7 Sup. Ct. 1254, 30 L. Ed. 1230; Kane v. Northern Cent. Ry. Co., 128 U. S. 91, 9 Sup. Ct. 16, 32 L. Ed. 339; Dist. of Columbia v. McElligott, 117 U. S. *572621, 6 Sup. Ct. 884, 29 L. Ed. 946; Smith v. Van Sciver, 58 N. J. Law, 190, 33 Atl. 390; McCarthy v. Lehigh Co., 48 Minn. 533, 51 N. W. 480.
(2) The doctrine of contributory negligence as a defense applies, and bars a recovery where the negligence of the employer consists merely in the breach of some ordinance or statutory duty, and the contributory negligence of the employe is the proximate cause of the injury. Victor Coal Co. v. Muir, 20 Colo. 320, 38 Pac. 378, 26 L. R. A. 435, 46 Am. St. 299; D. & R. G. Co. v. Gannon, 40 Colo. 195, 90 Pac. 853, 11 L. R. A. (N. S.) 216; Dresser on Employes’ Liability, pp. 248, 597 and cases cited.
(3) Where it affirmatively appears from plaintiff’s evidence that his negligence was the proximate cause of the injury, it becomes the duty of the court, upon motion for non-suit, to declare as , a question of law, that the action cannot be maintained. Behrens v. Ry. Co., supra; Lord v. Pueblo S. & R. Co., 12 Colo. 390, 21 Pac. 148; Jackson v. Crilly, 16 Colo. 103, 26 Pac. 331; Ry. Co. v. Ryan, 17 Colo. 98, 28 Pac. 79; Union C. & C. Co. v. Sundberg, 36 Colo. 8, 85 Pac. 319; Mau v. Morse, 3 Colo. App. 359, 33 Pac. 283.
3. Applying the foregoing principles to the undisputed facts, plaintiff, as a matter of law, cannot recover. Proof that he was guilty of contributory negligence, except for which the accident would not have happened, destroyed his prima facie case. He knew the elevator was in constant operation carrying supplies, and was apt to move at any moment. The floors were only nine feet apart and the cage platform in plain view but a few feet from his head; also the absence of the rope in the shaft advised him that the elevator was above. Plaintiff’s testimony that he looked up and did not see the elevator, cannot be accepted as against the physical facts that it was there, in plain view, only a few feet from his head. The legal effect and value of such evidence may be determined by the court as a matter of law. When plaintiff voluntarily thrust his head into the elevator shaft, under the then existing conditions, he was inviting almost certain death, and guilty of contributory *573negligence which was the proximate cause of his injury. As is said in the Mau case:
“If a man in his sound senses, with his eyes open, voluntarily and deliberately, even if carelessly, thrust himself into the jaws of death, we know of no theory upon which anyone can be held responsible for the consequences of his act but himself.”
4. We are of the opinion that plaintiff’s contributory negligence was the proximate cause of his injury. Mau v. Morse, supra; Victor Coal Co. v. Muir, supra; Murphy v. Webster, 151 Mass. 121, 23 N. E. 842; Degnan v. Jordan, 164 Mass. 84, 41 N. E. 117.
5. Plaintiff, as a matter of law, being guilty of contributory negligence, according to his own evidence, which was the proximate cause of the injury, and the city ordinance being no limitation upon the defense of contributory negligence in this case, the judgment of non-suit was right. This opinion, however, is limited to the facts disclosed in this case, viz: That the employe was guilty of contributory negligence which was the proximate cause of his injury, and the only negligence of the employer was the mere violation of a city ordinance. Upon the question of assumption of risk by the employe, or where his negligence consists in remaining at work under known dangerous conditions, and the only negligence of the employer is the mere violation of some statute or city ordinance, we express no opinion.
The judgment of the lower court is affirmed.
Affirmed.
Decision en banc.