I want to utilize CSS 3 Grid to position specific images on my home page that I imported. The desired outcome is as follows:
https://i.sstatic.net/aYshN.jpg
Currently, my grid looks like this:
https://i.sstatic.net/oEUWX.png
Below is the code snippet:
<div class="wrapper">
<div class="bed"><img src="http://placehold.it/300x300" alt=""></div>
<div class="pillow"><img src="http://placehold.it/300x300" alt=""></div>
<div class="kitchen"><img src="http://placehold.it/300x300" alt=""></div>
<div class="living-room"><img src="http://placehold.it/300x300" alt=""></div>
<div class="sofa"><img src="http://placehold.it/300x300" alt=""></div>
</div>
@endsection
@push('style')
<style>
.wrapper{
display: grid;
grid-template-columns: 1fr 0.5fr 1fr ;
grid-auto-rows: minmax(100px,auto);
padding: 1em;
}
.wrapper >div{
padding: 1em;
}
.bed{
height: 50%;
}
.pillow{
height: 50%;
width:100%;
}
.kitchen{
height: 50%;
}
.living-room{
height: 70%;
width:150%;
}
.sofa{
height: 50%;
width:150%;
}
img{
width:100%;
height: 100%;
border-radius: 20px;
}
How can I adjust the image positions to match the expected layout perfectly?
Update: