I have this sample:
Code pen or snippet :
.parent {
display: grid;
grid-template-columns: repeat(5, 1fr);
grid-template-rows: repeat(5, 1fr);
grid-column-gap: 0px;
grid-row-gap: 0px;
color: white;
}
.div1 {
grid-area: 1 / 1 / 3 / 2;
background: red;
}
.div2 {
grid-area: 1 / 2 / 2 / 6;
background: purple;
}
.div3 {
grid-area: 2 / 2 / 3 / 5;
background: blue;
}
.div4 {
grid-area: 2 / 5 / 3 / 6;
background: black;
}
<div class="parent">
<div class="div1">
<img src="https://png.pngtree.com/element_pic/00/16/07/115783931601b5c.jpg" width="100px"/>
</div>
<div class="div2">Div 2</div>
<div class="div3">Div 3</div>
<div class="div4">Div 4</div>
</div>
As you can see, the red column is wider than the logo.
I want it to be as big as the logo, can we do this with a display: grid?