In my CSS project, I am working with a class named .col3
which serves as a grid item within a div carrying the class of .container
.
The parent container has the property
grid-template-columns: 25% 25% 25% 25%
, defining its layout.
I would like the .col3
class to span across 3 columns. While the typical approach is:
.col3{
grid-column-start: 1;
grid-column-end: 4;
}
This method does not address occasions when I want the class to start at column 2 and extend to the end. Is there a uniform way to achieve "make this class span 3 columns" without specifying the exact starting and ending columns?