Dev Helpers
← Back

Span two columns with one item

Span two columns with one item with native CSS. The preview includes a small shared demo stylesheet.

Open this example in the interactive library

Source code

<style>
  .demo {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }
  .demo > :first-child {
    grid-column: span 2;
  }
</style>
<div class="demo">
  <span class="tile">One</span><span class="tile">Two</span
  ><span class="tile">Three</span>
</div>