CSS Grid row/column gap on specific elements? [duplicate]

It’s impossible to change the gap on specific elements.

However, you can reference specific grid item with grid-item:nth-child(n) and set negative margins to it.

For example, with a class of picture-1 it may look like this in the CSS file:

.picture-1:nth-child(3) {
  margin-bottom: -50px;
}

Leave a Comment

tech