When Content Rebels

1. Taming Scroll

  • visible: Content " spills out " (terrible UX).
  • hidden: Content is clipped (clean, but data is lost).
  • scroll: Scrollbars are always present (even if nothing to scroll).
  • auto: Scrollbars appear only when needed.

2. Text Clipping (Ellipsis)

One of the most common tasks: make " Text that breaks with ellipsis... " .

.card-title {
  white-space: nowrap; /* Prevent line break */
  overflow: hidden;    /* Clip excess */
  text-overflow: ellipsis; /* Add three dots */
}

3. The clip Property

Modern addition overflow: clip. It works like hidden, but completely prohibits any scrolling by programmatic means (e.g., via JS).