I have the following HTML:
<div class="grid">
<div class="special-1"></div>
<div class="special-1"></div>
<div class="special-2"></div>
<div class="special-2"></div>
<div class="special-2"></div>
<div class="special-2"></div>
<div class="special-2"></div>
<div class="special-2"></div>
</div>
.special-1 is always in the first column. The number of .special-2s is variable, generated by user data. So approximately:
.grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-auto-rows: 1fr;
}
.special-1 {
grid-column-start: 1;
}
Now the thing is, I want .special-2 to always be in at least the second column. But it can also show in the third or fourth. Is there anyway I can do this? grid-column-start: 2; doesn't work because it will put all of them in column 2 and none in the other columns. So I basically want grid-column: :not(1) or grid-column: 2 | 3 | 4 if you know what I mean. Any ideas?