So with the grid, when I don't have align-items: center;
the img shows fine, but once I add align-items: center;
it suddenly disappears. What's causing this issue?
.grid {
display: grid;
grid-template-columns: 1fr 1fr;
height: 100px;
}
img {
display: block;
max-height: 100%;
margin: 0 auto;
}
.align {
align-items: center;
}
<div class="grid">
<div>
<span>text</span>
</div>
<div>
<img src="http://via.placeholder.com/650x1050" />
</div>
</div>
<div class="grid align">
<div>
<span>text</span>
</div>
<div>
<img src="http://via.placeholder.com/650x1050" />
</div>
</div>
This seems to be a Chrome issue. It's also not fitting the img properly on firefox.