Is there anyway to tell my gp1
class column to start at grid position 1 and end at position max - 1, bearing in mind this is a dynamic grid?
.widthContainer {
width:400px;
height:300px;
background-color:#eee;
}
.grid {
display: grid;
grid-template-columns: repeat(auto-fit, 50px);
grid-template-rows: repeat(auto-fit, 25px);
min-height: 98%;
}
.grid>div {
grid-column: 1/-1;
grid-row: 1/-1;
grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
grid-template-rows: repeat(auto-fill, minmax(25px, 1fr));
display: grid;
}
.gp1 {
background-color: #aaa;
grid-row-start: 2;
grid-row-end: 4;
grid-column-start:2;
grid-column-end:4;
}
<div class="widthContainer">
<div class="grid">
<div class="bkg">
<div class="gp1">
<div>
<p>content</p>
</div>
</div>
</div>
</div>
</div>