Skip to content

Text Truncation

The text-truncate helper shortens long text to a single line and ends it with an ellipsis. It needs a block or inline-block element with a width limit; in flex layouts give the flexible item min-width: 0.

1Block level truncation

A block element with a max width; the dashed outline shows the limit.

We keep things simple, so you can focus on what matters to you. We listen first, then build a plan around what you actually need.

2Inline-block inside a sentence

Inline elements need d-inline-block plus a max width to truncate.

Last edited by Diego Nguyen and Luna Kowalski 9 hours ago.

3Inbox preview

Subject and preview text cut to one line in an email list.

  • Ravi FischerFive study habits that actually work – Clear prices, honest advice and no surprises along the way. Career coaches help with your CV, portfolio and interview practice.
  • Arjun LindqvistHow to stay motivated when learning online – Our team has done this many times, so you never have to guess. Guided learning paths take you from beginner to job-ready step by step.
  • Ava BrennanHeadlines people actually click – Lifetime access means you can revisit lessons whenever you need a refresher. Short quizzes after each lesson help new knowledge stick.

4Table cell notes

A long note column truncated with text-truncate and a max width on the cell.

OrderNoteTotal
#ORD-2608We measure success by how many students come back and tell their friends.$208.17
#INV-9409Every detail is handled by people who care about getting it right.$62.78
#INV-3505Every course is built around hands-on projects you can add to your portfolio.$244.34

5Long file names

File names shorten while the size stays visible at the end.

  • how-we-build-a-course,-start-to-finish-final-version-8.docx490 KB
  • our-favourite-tips-for-busy-weeks-final-version-8.docx520 KB
  • five-things-we-learned-this-year-final-version-2.docx558 KB

6Breadcrumb with a long last item

The current page title truncates so the breadcrumb stays on one line.

7Notification preview

A toast-like card where the message preview stays on one line.

Lucas Ashford replied: Study groups and a friendly forum keep you motivated along the way.just now

8Equal card titles

Truncated titles keep a grid of cards the same height.

A beginner's guide to getting started: Friendly people answer your questions quickly, by phone, chat or email.

Apr 11, 2026

Our most popular courses this year: The mobile app downloads lessons, so you can learn on the train.

Aug 28, 2026

Building a portfolio that gets interviews: Try the first lesson of any course for free before you decide.

Oct 7, 2025

9Chat list

In a flex row the text column needs min-width: 0 so text-truncate can shrink it.

10Long web addresses

Page addresses truncate in a link list; the full address is kept in the title attribute.

11Product grid names

Product names cut to one line under each image in a compact grid.

Copywriting Marketing edition
$86.00
Web development Development edition
$270.99
Photography Lifestyle edition
$100.99
Project management Business edition
$186.00

12Truncated chips

Badges with a max width so long labels never break the row.

What employers look for in junior analystsOur favourite tips for busy weeksThe small habits that make a big differenceHow to choose the right course

13User menu name

A long account name truncates inside the navbar button.

14Why min-width: 0 matters

Left: a flex child without min-width overflows. Right: with min-width: 0 the text truncates.

Without min-width

Lifetime access means you can revisit lessons whenever you need a refresher. Friendly people answer your questions quickly, by phone, chat or email.
New

With min-width: 0

Thousands of students already trust us, and we work hard to keep it that way. We measure success by how many students come back and tell their friends.
New

15Sidebar menu

Project names in a narrow sidebar stay on one line each.

16Kanban card titles

Narrow board columns keep task titles tidy with truncation.

To do
Headlines people actually click
Five study habits that actually work
Doing
How to stay motivated when learning online
From teacher to UX designer: a career story
Done
What our students asked us most
How we build a course, start to finish

17Order summary address

A long shipping address truncated in a summary line, with an edit link.

Nadia Sato, 175 Station Street, Oslo 18500, Norway Change

18Dropdown with a long value

The selected option truncates inside a fixed width dropdown button.

19Playlist

Long episode or track titles truncate while the duration stays aligned.

  1. Master a new skill this season4:08
  2. Study smarter with guided paths3:03
  3. Short courses, real results3:11

20Full text in a tooltip

Offer the complete text in a tooltip so nothing is lost when it is truncated.

Every course is built around hands-on projects you can add to your portfolio. Earn a certificate at the end of each course and share it with employers.