# Spot the bug - #62

**URL:** <https://forum.kirupa.com/t/spot-the-bug-62/682218>\
**Category:** web dev\
**Created:** [June 21, 2026, 7:00am UTC](https://forum.kirupa.com/t/spot-the-bug-62/682218 "2026-06-21T07:00:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yoshiii](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/yoshiii/32/31156_2.png) [@Yoshiii](https://forum.kirupa.com/u/Yoshiii)\
**Post date:** [June 21, 2026, 7:00am UTC](https://forum.kirupa.com/t/spot-the-bug-62/682218/1 "2026-06-21T07:00:08Z")

</div>

Layout bug is hidden in plain sight.

```css
.dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 12px;
}
.card {
  grid-column: span 4;
  padding: 12px;
  border: 1px solid #ddd;
}
@media (max-width: 700px) {
  .dashboard {
    grid-template-columns: 1fr;
  }
}

```

Reply with what is broken and how you would fix it.

---

<div class="post-metadata">

**Author:** ![VaultBoy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/vaultboy/32/31832_2.png) [@VaultBoy](https://forum.kirupa.com/u/VaultBoy)\
**Post date:** [June 22, 2026, 7:20am UTC](https://forum.kirupa.com/t/spot-the-bug-62/682218/2 "2026-06-22T07:20:28Z")

</div>

That `grid-column: span 4; ` on `. card` is busted, because your grid only defines 3 columns. In CSS Grid, spanning past the explicit columns makes the item create an implicit extra column, so you get weird overflow/spacing like your layout is “making a 4th lane” nobody asked for. Fix is just to span what exists (or don’t span at all if every card is the same size):

```auto
.card { grid-column: span 3; } /* or just remove grid-column */
@media (max-width: 700px) { .card { grid-column: 1 / -1; } }

```

I found a related kirupa. com article that can help you go deeper into this topic:
