I have an image inside of a grid, I want the image to fill the grid container, and hide any overflow, see code:
<div class="serviceFlexChildLeft serviceGridImage">
<img id="broadcastProductionImage1" src="content/images/homepage/broadcastProduction2.png">
<img id="broadcastProductionImage2" src="content/images/homepage/broadcastProduction3.png">
<div id="broadcastSlash"></div>
</div>
.serviceGridImage {
display: grid;
height: 40rem;
grid-template: 50% 50% / 100%;
overflow: hidden;
}
#broadcastProductionImage1 {
object-fit: cover;
justidy-self: center;
align-self: center;
grid-area: 1 / 1 / 2 / 2;
overflow: hidden;
}
#broadcastProductionImage2 {
object-fit: cover;
justify-self: center;
align-self: center;
grid-area: 2 / 1 / 3 / 2;
overflow: hidden;
}
you can see I've tried putting overflow: hidden on both the image itself, and on the grid parent, neither seem to have any effect, I've used both object-fit: cover; and min-width: 100%; min-height: 100%; to attempt achieving my desired results, neither seems to yield what I want, it does appear to work once I define either width or height without the min, but those both mess up the images ability to dynamically scale and fit the container.
suggestions?