CSS: Is it possible to remove the grid element baby from the flow?

I want to put div “second line” on a new line and I want to avoid absolute positioning.

Link to code.

<div class="grid">
  <div>1</div>
  <div>2</div>
  <div>3</div>
  <div class="another-line">another line</div>
</div>
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.grid > div {
  border: 1px solid red;
}

.another-line {} // ???

Leave a Reply

Your email address will not be published.