Webflow sync, pageviews & more.
NEW

How can I show ellipsis (...) when text is cut off in a Webflow textbox due to the size of the block? Can anyone provide the necessary code or solution? Thank you!

TL;DR
  • Add a custom CSS class with overflow: hidden, text-overflow: ellipsis, and white-space: nowrap to enable single-line text truncation with ellipsis.
  • Insert the CSS via an Embed component or Project Settings > Custom Code, apply the class to your text element, and ensure it has a limited width; use -webkit-line-clamp for multi-line truncation.

To show ellipsis (…) when text is cut off in a Webflow text element due to limited space, you need to apply specific CSS properties. Webflow’s Designer doesn’t natively include a UI for this, so you’ll need to use custom code or add classes with these styles in the Designer.

1. Apply CSS for Ellipsis Truncation

To enable ellipsis for single-line text truncation, you need to use the following CSS properties on the text element:

  • overflow: hidden
  • text-overflow: ellipsis
  • white-space: nowrap

Since Webflow doesn't expose text-overflow in its style panel, you'll need to add custom code.

2. Using Webflow’s Embed Component or Page Settings

You can include this custom CSS via either the Embed Code component in the Designer or by adding it in the Project settings > Custom Code > Head section:

Inside an HTML Embed, use inline tags:

<style>  .ellipsis-text {    overflow: hidden;    text-overflow: ellipsis;    white-space: nowrap;  }</style>

3. Add the Class to Your Element

  • Select your text element in the Designer.
  • Add a custom class (e.g., ellipsis-text).
  • Ensure that the element has a fixed width, max-width, or its parent does. Otherwise, the text won't overflow and truncate.

4. For Multi-Line Ellipsis (Optional Advanced)

If you want to truncate after 2+ lines and show ellipsis, use:

.ellipsis-multiline {  display: -webkit-box;  -webkit-line-clamp: 2; /* change to number of lines */  -webkit-box-orient: vertical;  overflow: hidden;}

Add this to the custom code area, and apply the class ellipsis-multiline to your text element.

Summary

To show ellipsis (…) when text overflows in Webflow, use the overflow: hidden, text-overflow: ellipsis, and white-space: nowrap properties via a custom CSS class. Assign that class to your text block, and ensure it has a constrained width. Use -webkit-line-clamp for multi-line truncation if needed.

Rate this answer

Other Webflow Questions