Briefing

Fixed-Height Card Layouts Break Under Content Changes

ux
by Kevine Nzapdi ·

Remove fixed heights, absolute positioning, and line clamping from card components; use flexbox or grid so the card height adapts to content and prevents overflow.

What to do now

Patch your card component by removing fixed heights, absolute positioning of actions, and line clamping; replace them with flexbox or grid to let the card height grow with its content and ensure all elements fit without overflow.

Summary

Fixed-height cards look tidy when designers assume short titles and excerpts, but they collapse once content length grows, translations add characters, or users increase browser font size. The article shows that setting a hard height, using “overflow:hidden”, and clamping titles and excerpts with “-webkit-line-clamp” masks the problem until the constraints are removed, at which point text spills over and overlaps other elements.

The author also highlights that absolutely positioned action buttons at the bottom of each card create invisible space that the parent container ignores, forcing developers to estimate padding manually. By removing absolute positioning and letting the browser calculate the card’s intrinsic height, the layout tension is reduced, but the fixed height still forces a ceiling on the content. The piece concludes that line clamping, while visually reassuring, actually reinforces the illusion of control and should be replaced with flexible overflow handling to allow cards to grow naturally.

Key changes

  • Fixed heights cause overflow when content changes
  • Absolute positioned actions create hidden space that the parent ignores
  • Overflow: hidden masks content spill until removed
  • Removing absolute positioning reduces layout tension
  • Line clamping hides overflow but creates illusion of control
  • Browser cannot reconcile fixed height with dynamic content
  • Padding estimates fail when font size or translations change
  • Dynamic height via flexbox/grid allows content to dictate size

Affects

internal

Customer impact

Analyzing matches…

Ask about this story

Impact on an agency? Which customers? Compare historically Risks of waiting