I am facing an issue with displaying a long image in a container with a scroll bar. Currently, I have a container called "work-sample" with a project-container that holds the image. The image appears fine in Safari, but in Chrome and Safari on Macs, it is getting compressed together.
#work-sample {
flex: 1 3 auto;
flex-basis: 3;
display: flex;
flex-direction: column;
justify-content: flex-end;
width: 100%;
height: 400px;
position: relative;
overflow-y: scroll;
padding-right: 1rem;
padding-top: 1rem;
padding-bottom: 1rem;
}
.project-scroll {
overflow-x: hidden;
overflow-y: scroll;
object-fit: cover;
}
#project-long {
width: 100%;
height: 100%;
text-align: center;
}
<div id="work-sample" class="work-sample">
<div class="project-scroll">
<img id="project-long" src="../media/incompatible-image.png">
</div>
</div>