Hard Edge

Flexbox Gap Finally Fixed Our Spacing

posted by Tomás Vidal
September 4, 2026
CSS
Photograph for “Flexbox Gap Finally Fixed Our Spacing”

Gap on flex containers removed a whole class of spacing bugs from our sites.

What we removed

Colour is the last thing we add. Getting the structure right in black and white first saves a lot of arguing later.

  • Negative margins on wrappers
  • Last-child margin resets
  • Spacer divs between buttons

None of this is new. It is the same advice print designers have given for a century, moved onto screens.

Spacing belongs to the parent. Gap finally lets it live there.

We keep a scratch file of small experiments like this one. Most of them go nowhere, but a few end up in every project.

Clients rarely notice these details directly. They notice that the site feels solid, and that nothing jumps around when it loads.

The code is short enough to read in one sitting. That matters, because code you can read is code you can change.

We still get it wrong sometimes. The difference now is that fixing it takes one line instead of an afternoon.

Try it on a small page first, not your whole site. You will learn more from one finished page than a half-finished redesign.

12 thoughts on “Flexbox Gap Finally Fixed Our Spacing”

Leave a Reply

Your email address will not be published. Required fields are marked *