I'm trying to create a layout similar to this image, I've tried using this grid but can't make it happen.
<ul class = "container"> <li class = "first"> </li> <li class = "second"> </li> <li class = "third"> </li> <li class = "fourth"> </li> </ul>
.container{ display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 20px; } .first{ grid-column: span 2; }
I tried this and it worked
In HTML
html and css have been changed, and
ul
andli
are not recommended for layout. You need to span the grid as per your requirement.