I am attempting to create cards with a unique design where the first row consists of 2 columns, one being a GIF that shows the card fitting into a cell with a border. However, all I see is an empty cell without any display.
Below is the code snippet I am using:
.detailsgrid {
display:grid;
grid-template-columns: 35px 1fr;
grid-template-rows: 200px 40px 1fr 35px;
border: solid 1px;
}
.detailsimg {
grid-row-start: 1;
grid-column-start: 1;
grid-row-end: 2;
grid-column-end: 3;
object-fit: cover;
}
<div class="detailsgrid">
<img class="detailsimg" src="https://picsum.photos/100/100" width= 300px>
</div>
<div class="detailsname">
Honing
</div>
<div class="detailsdescription">Straightening the blade so it stays sharp (no material is taken off the blade). </div>
<i class="far fa-clock detailstimeicon"></i>
<div class="detailstime">
This is how often you should do it
</div>
</div>
I initially set the size to 200px in order to accommodate the GIF, but I prefer for the area to adjust based on the actual size of the GIF.
Here is an image demonstrating what I aim to achieve:
Any suggestions on how I can accomplish this?