I'm struggling to get my images to resize based on the container size, especially when viewed on tablets or phones. The current result is that the images are too zoomed in and I can't figure out what's causing this issue.
<div class="ps-section--homeCenter" style="display:grid; grid-template-columns: repeat(3,1fr); grid-auto-rows: 213px 213px; grid-gap: 10px; padding:0; margin: 0; box-sizing: border-box;">
<div class="gallery_container">
<div class="gallery_Item" style="width:100%; height: 100%; position: relative;">
<div class="imgInGallery" style="width: 100%; height: 100%; overflow:hidden;">
<img src="http://placekitten.com/500/400" style=" object-fit: cover; object-position: 50% 50%;" />
</div>
</div>
</div>
<div class="gallery_container">
<div class="gallery_Item" style="overflow:hidden;">
<div class="imgInGallery" style="display:flex; height: 100%; align-items:center">
<img src="http://placekitten.com/300/200" style="
max-height:100%; max-width: 100%; align-self:center; " />
</div>
</div>
</div>
<!-- More gallery containers go here -->
</div>