I have a grid in which I position images but they doen't fill the entire space they are given.
I hope the image below illustrates the problem good enough. As we can see the top image as well as the right one don't fill the rows they are assigned to. What causes this and how can I fix it?
Code is like that:
<section class="wrapper">
<div class="one">
<img class="img" src="images/lorem/ipsum.jpg" alt="">
</div>
<div class="two">
<img class="img" src="images/lorem/ipsum2.jpg" alt="">
</div>
<div class="three">
<img class="img" src="images/lorem/ipsum3.jpg" alt="">
</div>
</section>
.wrapper {
display: grid;
grid-template-columns: repeat(8, 1fr);
grid-auto-rows: minmax(150px, auto);
grid-gap: 20px;
height: 100vh;
}
.one {
grid-column: 2 / 7;
grid-row: 1 / 3;
}
.two {
grid-column: 2 / 5;
grid-row: 3 / 4;
}
.three {
grid-column: 5 / 7;
grid-row: 3 / 4;
}
.img {
width: 100%;
}
How can I fix this?