📦
Case 5
The third card that keeps dropping
🎫 Client ticket
Three cards should fit neatly side by side, but the third one keeps wrapping onto a new line. Each card is set to a third of the width, yet somehow they're too wide for the row.
HTML
CSS
✅ Fixed! Case closed.
You found the faulty line and corrected it — exactly what real debugging feels like.
Why it broke: With the default
content-box sizing, width: 33% applies to the content only — the 20px padding and 4px border are added on top, pushing each card past a third of the row. Adding box-sizing: border-box makes the width include padding and border, so three cards finally fit. Pros set this on everything at the top of their CSS.