
552 So.2d 1070 (1989)
Edward R. BANKS
v.
BAYOU BEND II, LTD., and Bayou Bend Apartments, Inc.
88-496.
Supreme Court of Alabama.
October 13, 1989.
James F. Barter, Jr., Mobile, for appellant.
Vincent A. Noletto, Jr., and Craig W. Goolsby of Brown, Hudgens, Richardson, Mobile, for appellees.
JONES, Justice.
Edward R. Banks appeals from a summary judgment entered in favor of Bayou Bend II, Ltd., and Bayou Bend Apartments, Inc. (both hereinafter called "Bayou Bend"). We affirm in part and reverse in part.
Contractor Mark Patterson[1] hired Banks to repair stairs at the Bayou Bend apartment complex. Banks was injured when the stair landing on which he was working collapsed. Banks filed two lawsuits as a result of the accident: a workmen's compensation action and a suit based on negligence. The trial court entered summary judgment in favor of Bayou Bend in both cases, and Banks brings this appeal from the judgment entered against him in the negligence action.
Banks makes two primary arguments on appeal: 1) that Bayou Bend retained control of the manner in which Banks performed his work; therefore, he says, he was an employee to whom Bayou Bend owed the duty of providing a safe place to work;[2] and 2) Bayou Bend had a duty either to maintain the premises so as to be free of danger or to warn Banks of any dangers of which Bayou Bend knew or should have known. Reviewing these arguments *1071 in the light of the facts of this appeal, we conclude that there was some evidence that Bayou Bend knew or should have known of the dangerous condition of the landing; therefore, summary judgment should not have been granted on this issue. However, because the workmen's compensation judgment held that Banks was not an employee, and because Banks does not appeal from that judgment, he is barred by the doctrine of res judicata from raising this issue in the context of the instant appeal.
We will address the issue of the application of the doctrine of res judicata first.
"The essential elements of res judicata are (1) a prior judgment on the merits, (2) rendered by a court of competent jurisdiction, (3) with substantial identity of the parties, and (4) with the same cause of action presented in both suits. [Citations omitted.] If these essential elements are met, any issue that was or could have been adjudicated in the prior action is barred from further litigation."
Hughes v. Allenstein, 514 So.2d 858, 860 (Ala.1987). (Emphasis in original.)
The facts of the instant case provide the elements of res judicata as set out above; thus, the holding of the workmen's compensation judgment that Banks was not an employee of Bayou Bendnot appealed fromprecludes Banks from raising that issue in this appeal. Summary judgment was properly entered against Banks on this issue.
We turn now to the question whether a jury question was presented by Banks's claim that Bayou Bend failed to warn him of the dangerous condition of the stair landing. As the employee of an independent contractor who had entered the Bayou Bend premises to perform work for the benefit of Bayou Bendand there was evidence that he was such an employee Banks would properly be classified as an "invitee." See Bush v. Alabama Power Co., 457 So.2d 350 (Ala.1984). The duty owed a business invitee by a premises owner is well established:
"The occupant of premises has a duty to business invitees to use reasonable care and diligence to keep the premises in a safe condition; or, if his premises are in a dangerous condition, to give sufficient warning so that, by the use of ordinary care, his invitees may avoid the danger."
Edwards v. Hammond, 510 So.2d 234, 236 (Ala.1987).
If Banks knew of and appreciated the danger, if the danger was obvious to him, or if Banks should have observed the danger, then Bayou Bend is not liable for any injury to Banks resulting from the dangerous condition. Heath v. Sims Brothers Construction Co., 529 So.2d 994 (Ala. 1988). However, if Bayou Bend knew of the danger and either Banks did not know of the danger or the danger was not readily observable, then Bayou Bend is liable for the injuries sustained by Banks. Banks argues that Bayou Bend knew or should have known of the dangerous condition of the stair landing.
Summary judgment is appropriate only when there is no genuine issue of material fact and the moving party is entitled to a judgment as a matter of law. Rule 56(c), A.R.Civ.P.; Sadie v. Martin, 468 So.2d 162 (Ala.1985). We agree with Banks that there was evidence in support of his contention that Bayou Bend knew of the dangerous condition but failed to warn him.
Jane Johnson, resident manager of Bayou Bend, testified that she and Thomas Greaves, general partner of Bayou Bend II, Ltd., knew that one of the main beams supporting the stairs on which Banks was hired to work was rotten and needed to be replaced. She further testified that she told Patterson and Banks that the beam was rotten; Banks, however, testified that no one told him the beam was rotten; and Greaves stated that he was unaware that the beam was rotten. Factual conflicts such as this must be resolved by the trier of fact. Rule 56(c), A.R.Civ.P.; Boswell v. Coker, 519 So.2d 493 (Ala.1987). Similarly, whether the beam was a hidden danger or presented an open and obvious condition, the danger of which could be appreciated, *1072 is a question of fact properly within the province of the jury. Bush v. Alabama Power Co., supra.
There was evidence to support the inference that Bayou Bend knew of the danger to Banks but failed to warn him of it. We do not comment on the weight to be given this evidence by the factfinder; we merely note that sufficient evidence was presented to preclude the granting of summary judgment to Bayou Bend on Banks's claim that Bayou Bend negligently failed to warn Banks of the danger.
Therefore, the trial court's judgment in favor of Bayou Bend on the issue of whether Banks was an employee of Bayou Bend is affirmed; and the trial court's judgment in favor of Bayou Bend on the issue of Bayou Bend's alleged negligent failure to warn is reversed; and the cause is remanded for further proceedings in accordance with this opinion.
AFFIRMED IN PART; REVERSED IN PART; AND REMANDED.
HORNSBY, C.J., and SHORES, ADAMS and KENNEDY, JJ., concur.
HOUSTON, J., concurs in part and dissents in part.
HOUSTON, Justice (concurring in part and dissenting in part).
It appears to me that Banks knew about the danger and that the dangerous condition was readily apparent. Banks was engaged to remove the rotten boards in the stairway. His deposition shows that, prior to doing so, he did and observed the following:
"Q. Do you remember seeing any place that looked like they were rough or unpainted or perhaps rotten on the bottom side of the boards on the landing?
"A. I'm sure they were bound to look a little bit rough under there. I don't remember how bad. You know. The whole thing, really, looked a little rough to me.
"Q. Did it look like the whole thing needed to be replaced to you?

"A. Most of it anyway.

"Q. Including the landing?

"A. Maybe part of the landing.

"....
"Q. Did you go up under there and look at any of them on the third set?
"A. I think I walked back under there, yes, sir.
"Q. Tell me what you remember seeing when you walked up there and looked at the third set of steps.

"A. Well, I just seen some boards that looked rotten. Some of them was." (Emphasis added.)
Nevertheless, Banks went up to the landing on the "third set of steps," and began trying to knock loose the rotten boards. The boards came loose, causing the stairway landing to collapse, injuring Banks. I do not think that the trial court erred in entering summary judgment on this issue. Heath v. Sims Brothers Construction Co., 529 So.2d 994 (Ala.1988).
I concur as to the other aspects of the opinion.
NOTES
[1]  Patterson was named as a defendant but was later dismissed by stipulation of the parties.
[2]  Banks argues that, while he was not an employee under the Workmen's Compensation Act, he was, nevertheless, an employee for the purpose of imposing a duty upon Bayou Bend to provide him with a safe place to work. We view the two theories as being totally inconsistent, and, because of our holding on the res judicata issue with respect to Banks's status as an employee, we review the propriety of the summary judgment only as it relates to his status as an invitee.
