Struggling with implementing the css grid layout module to showcase a 12-column, 3-row grid.
The initial row should only contain two elements, positioned on each side of the grid with empty cells in between using ten periods.
Subsequent rows should automatically display the remaining elements.
Considering the use of grid-template-areas for better control over placement but facing issues as it requires specifying individual grid-area names for all elements.
Encountering complications while attempting to set the grid-area property to 'auto' for the remaining cells to fill the third row, observing that they occupy the empty cells from the first row instead.
Would appreciate advice on the most efficient solution to resolve this problem.
Provided below is the code snippet:
.grid {
display: grid;
grid-template-areas:
"elem1 . . . . . . . . . . elem2"
"elem3 elem4 elem5 elem6 elem7 elem8 elem9 elem10 elem11 elem12 elem13 elem14";
}
.elem{
text-align: center;
color: white;
}
...
<div class="grid">
<div class="elem elem1">
elem1
</div>
...
</div>
Your help is greatly appreciated.