title: How to span the CSS-GRID Gap?
body: <p>css-grid column-gap property makes it easy to create space between elements. However, it's not so easy to overlay elements and target the edge of the gap. With a 12 column Grid with 16px gaps between the columns and 16px columns on the edges my solution is to have 26 columns, like this:</p>
  <pre><code>.wrapper {
  grid-template-columns: repeat(12, 16px 1fr) 16px ;
  }
  </code></pre>
  <p>Then, if you want to target the gap edge (see images), you can use normal grid-column spacing, you only must keep in mind you have now 26 columns.</p>
  <pre><code>div {
  grid-column: 1/3;
  background-color:blue;
  }
  
  </code></pre>
  <p>Of course the grid-gap, gap, or column-gap property should simplify this, only it doesn't. Using column gaps instead of columns you can't target the edge of the gap unless you enlarge the overlaid div beyond 100% of the columns containing it.</p>
  <p>Here are three images to explain what I mean:</p>
  <p>Image 1:</p>
  <p><a href="https://i.stack.imgur.com/UE3VG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UE3VG.png" alt="enter image description here" /></a></p>
  <p>In the image above is a blue div overlaying column 1 of a 12 column layout with 16px gap.</p>
  <pre><code>.wrapper {
  grid-template-columns: repeat(12, 1fr);
  column-gap:16px;
  }
  
  .div-1 {grid-column:1; background-color:pink;}
  .div-2 {grid-column:2; background-color:pink;}
  etc..
  
  .div-overlay {grid-column: 1/2; background-color:blue;}
  
  </code></pre>
  <p>Image 2:</p>
  <p><a href="https://i.stack.imgur.com/smK4S.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/smK4S.png" alt="enter image description here" /></a></p>
  <p>In the second image above everything is the same except the blue div overlaying the pink 12 column grid spans to the third column instead of the second (it looks like the end of the second column, because it's before the first gap, but actually the first gap is included in the third column and line number three is the start of the third column).</p>
  <pre><code>
  .div-overlay {grid-column: 1/3; background-color:blue;}
  
  </code></pre>
  <p>Image three:</p>
  <p><a href="https://i.stack.imgur.com/DVYvS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DVYvS.png" alt="enter image description here" /></a></p>
  <p>In the third image, above, if you want to target the start of the second column and the end of the first gap, you need to change the width of the overlaying blue div, you can't use the grid-column property with spans to get it done.</p>
  <pre><code>.div-overlay{
  grid-column:1/2;
  width:111%;
  background-color:blue;
  }
  
  </code></pre>
  <p>One would think with gap, column-gap, and grid-gap properties you would be able to span just the gap using a key word such as in this ficticious example:</p>
  <pre><code>.div-overlay{
  grid-column:  col 1 / span gap 1;
  background-color:blue;
  }
  
  </code></pre>
  <p>Am I missing something, or should I stick with 26 column grids to get it done?</p>