39 CSS Breadcrumbs
33 / 39

All 39 in 39 CSS Breadcrumbs

  1. 01Accessible Breadcrumb Navigation with Schema.org Microdata & ARIA
  2. 02Responsive Collapsing CSS Breadcrumb Bar using :has() Selector
  3. 03Adaptive Light & Dark Mode Breadcrumb Bar with CSS Custom Properties
  4. 04E-Commerce Filter & Attribute Breadcrumb Navigation Component
  5. 05Modern Glassmorphism Floating Breadcrumb Bar UI Design
  6. 06Neumorphic Soft UI Breadcrumb Navigation with Dual Box Shadows
  7. 07Sticky Top CSS Navigation Header with Shrinking Breadcrumb Trail
  8. 08Material Design Flat Breadcrumb Navigation Bar
  9. 09Isometric 3D Layered CSS Breadcrumb Navigation
  10. 10Breadcrumb Bar with Built-In Dropdown Sibling Menus
  11. 11Full-Width Block-Style Segmented CSS Breadcrumb Bar
  12. 12CSS Custom-Property Accent-Color Toggle Breadcrumb
  13. 13Seamless Arrow-Cutout CSS3 Breadcrumb Trail
  14. 14Compact Icon-Only Home Node CSS Breadcrumb Bar
  15. 15Segmented Rounded-Outline Pill CSS Breadcrumb
  16. 16Neumorphic Soft Inset-Shadow CSS Breadcrumbs
  17. 17CSS Grid Auto-Fitting Responsive Breadcrumb Trail
  18. 18NFT/Web3 Holographic Shimmer Breadcrumb Component
  19. 19SaaS Marketing Site Gradient Text Breadcrumb Bar
  20. 20Airbnb-Style Filter Chip Breadcrumb Navigation with Icons
  21. 21Editorial Blog Breadcrumb with Animated Wave Underline Hover
  22. 22Developer Docs Breadcrumb with One-Click Path Copy to Clipboard
  23. 23Modern Pure CSS Arrow Breadcrumb Bar using clip-path Polygons
  24. 24Multi-Line Aligned CSS Grid Subgrid Breadcrumb Layout
  25. 25Interactive Breadcrumb Links with Animated CSS Underline Glow
  26. 26Minimalist CSS Breadcrumb with Custom SVG Separators
  27. 27Multi-Step Checkout & Form Wizard CSS Breadcrumb Indicator
  28. 28Pure CSS Ribbon-Style Chevron Breadcrumb Trail
  29. 29Pill-Shape Badge CSS Breadcrumb Bar UI
  30. 30Clean Line-Separator Minimalist CSS Breadcrumbs
  31. 31Gradient Background Glow CSS Breadcrumb Bar
  32. 32Floating Card Shadow CSS Breadcrumb Navigation
  33. 33Truncated Ellipsis Compact CSS Mobile Breadcrumb
  34. 34Inline Bullet-Point Dot Separator CSS Breadcrumb
  35. 35Skewed Parallel Quadrilateral CSS Breadcrumb Bar
  36. 36Outline Border-Only Geometric CSS Breadcrumbs
  37. 37Circular Icon & Numbered CSS Step Breadcrumbs
  38. 38Frosted Glass Dark UI CSS Breadcrumb Component
  39. 39Modern Micro-Interaction Animated Hover Breadcrumbs
Pure CSSMIT licensed

Truncated Ellipsis Compact CSS Mobile Breadcrumb

A single-line breadcrumb engineered for tight mobile widths: each crumb caps its width and truncates long titles with an ellipsis, the trail never wraps or overflows, and the current page always stays fully visible while ancestors shrink first. Pure CSS overflow management for constrained viewports.

Live Demo
Plain CSSTailwind v4
Try it

Build interactive UI like this from scratch: 20 HTML, CSS & JavaScript projects

ZTM · JavaScript Web Projects · 30‑day money-back guarantee · Affiliate link

10% off at checkout with code
Check ZTM Course

The code

<nav class="bc-33" aria-label="Breadcrumb">
  <ol>
    <li><a href="#" title="Home">Home</a></li>
    <li><a href="#" title="Electronics &amp; Accessories">Electronics &amp; Accessories</a></li>
    <li><a href="#" title="Headphones and Earbuds">Headphones and Earbuds</a></li>
    <li><a href="#" aria-current="page" title="Wireless Over-Ear Noise-Cancelling">Wireless Over-Ear Noise-Cancelling</a></li>
  </ol>
</nav>
.bc-33 {
  display: grid;
  width: 100%;
  min-height: 100vh;
  font-family: system-ui,'Segoe UI',sans-serif;
  padding: 26px;
  background: oklch(0.98 0.004 240);
  place-items: center;
}

.bc-33 * {
  box-sizing: border-box;
}

.bc-33 ol {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  list-style: none;
  margin: 0 auto;
  padding: 10px 12px;
  max-width: 340px;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  border: 1px solid oklch(0.9 0.008 240);
}

.bc-33 li {
  display: flex;
  align-items: center;
  min-width: 0;
}

.bc-33 li + li::before {
  content: "›";
  flex: none;
  margin: 0 6px;
  color: oklch(0.7 0.02 240);
}

.bc-33 a {
  min-width: 0;
  max-width: 12ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font: 500 13px/1 system-ui,sans-serif;
  color: oklch(0.5 0.09 250);
  text-decoration: none;
  padding: 2px 3px;
  border-radius: 5px;
}

.bc-33 li:not(:last-child) a {
  flex-shrink: 1;
}

.bc-33 a:hover {
  color: oklch(0.4 0.13 250);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bc-33 a:focus-visible {
  outline: 2px solid oklch(0.5 0.14 250);
  outline-offset: 1px;
}

.bc-33 li:first-child a,
.bc-33 li[aria-current="page"] a {
  flex-shrink: 0;
}

.bc-33 li[aria-current="page"] a {
  max-width: none;
  color: oklch(0.3 0.02 240);
  font-weight: 600;
}
/* No JavaScript — flex-shrink priorities + min-width:0 + text-overflow:ellipsis truncate ancestors first while the current page (flex-shrink:0) stays fully visible; nothing ever overflows. */
Paste this into ChatGPT, Claude, Cursor, or any coding assistant. The block below is pre-framed with everything the AI needs to integrate this demo into your project — markup, styles, scoping notes, and the source URL. Hit Copy and paste straight into your chat.
Here's a working CSS Breadcrumb from CodeFronts. Use it as-is or adapt to your framework. All classes are scoped under a unique prefix so the code won't collide with your existing styles. MIT licensed.
Demo: Truncated Ellipsis Compact CSS Mobile Breadcrumb
Source: https://codefronts.com/navigation/css-breadcrumbs/glassmorphism-bar/

A single-line breadcrumb engineered for tight mobile widths: each crumb caps its width and truncates long titles with an ellipsis, the trail never wraps or overflows, and the current page always stays fully visible while ancestors shrink first. Pure CSS overflow management for constrained viewports.
## HTML
```html
<nav class="bc-33" aria-label="Breadcrumb">
  <ol>
    <li><a href="#" title="Home">Home</a></li>
    <li><a href="#" title="Electronics &amp; Accessories">Electronics &amp; Accessories</a></li>
    <li><a href="#" title="Headphones and Earbuds">Headphones and Earbuds</a></li>
    <li><a href="#" aria-current="page" title="Wireless Over-Ear Noise-Cancelling">Wireless Over-Ear Noise-Cancelling</a></li>
  </ol>
</nav>
```
## CSS
```css
.bc-33 {
  display: grid;
  width: 100%;
  min-height: 100vh;
  font-family: system-ui,'Segoe UI',sans-serif;
  padding: 26px;
  background: oklch(0.98 0.004 240);
  place-items: center;
}

.bc-33 * {
  box-sizing: border-box;
}

.bc-33 ol {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  list-style: none;
  margin: 0 auto;
  padding: 10px 12px;
  max-width: 340px;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  border: 1px solid oklch(0.9 0.008 240);
}

.bc-33 li {
  display: flex;
  align-items: center;
  min-width: 0;
}

.bc-33 li + li::before {
  content: "›";
  flex: none;
  margin: 0 6px;
  color: oklch(0.7 0.02 240);
}

.bc-33 a {
  min-width: 0;
  max-width: 12ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font: 500 13px/1 system-ui,sans-serif;
  color: oklch(0.5 0.09 250);
  text-decoration: none;
  padding: 2px 3px;
  border-radius: 5px;
}

.bc-33 li:not(:last-child) a {
  flex-shrink: 1;
}

.bc-33 a:hover {
  color: oklch(0.4 0.13 250);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bc-33 a:focus-visible {
  outline: 2px solid oklch(0.5 0.14 250);
  outline-offset: 1px;
}

.bc-33 li:first-child a,
.bc-33 li[aria-current="page"] a {
  flex-shrink: 0;
}

.bc-33 li[aria-current="page"] a {
  max-width: none;
  color: oklch(0.3 0.02 240);
  font-weight: 600;
}
```

## JavaScript
```js
/* No JavaScript — flex-shrink priorities + min-width:0 + text-overflow:ellipsis truncate ancestors first while the current page (flex-shrink:0) stays fully visible; nothing ever overflows. */
```

How this works

The trail is a single display:flex;flex-wrap:nowrap row. Each crumb link is white-space:nowrap;overflow:hidden;text-overflow:ellipsis with a max-width cap, so a long category name becomes 'Wireless Over-Ear…' instead of pushing the row wide. The key move is priority: intermediate crumbs get flex-shrink:1 and a tight min-width, while the current page gets flex-shrink:0 and no truncation — so as space runs out, ancestors give up width first and the page you're on stays fully readable.

The whole row sits in an overflow:hidden container so nothing ever escapes the viewport, and separators are compact chevrons. On a comfortable width all labels show in full; squeeze the container and the truncation kicks in progressively from the least-important crumb. This is the pragmatic mobile pattern — no JS measuring, no layout jank, just CSS flex priorities and text-overflow doing their jobs.

Make it yours

  • Per-crumb max-width (in ch) is the truncation aggressiveness dial — 8ch is tight, 16ch is roomy.
  • Protect two crumbs (home + current) from shrinking by giving both flex-shrink:0.
  • Add a full-title title attribute (or a tooltip) so truncated labels are recoverable on hover/long-press.
  • Pair with demo 03's ellipsis-collapse for an even denser trail on the narrowest phones.

Gotchas — read before shipping

  • text-overflow:ellipsis needs all three: overflow:hidden, white-space:nowrap, and a constraining width — miss one and it won't clip.
  • A flex item won't shrink below its content unless you set min-width:0 — the classic flexbox truncation gotcha; it's required here.
  • Don't truncate the current page — users need to know where they are; give it flex-shrink:0.
  • Provide the full text somewhere (title attr / visually-hidden) so truncation doesn't hide information from screen readers or hover.

Browser support

ChromeSafariFirefoxEdge
111+15.4+113+111+

Floor set by oklch() as this demo is written. The core technique itself goes back further — Chrome all.

text-overflow, flex-shrink and min-width:0 are universally supported. This is a compatibility-first pattern with zero modern dependencies.

Techniques used in this demo

Search CodeFronts

Loading…