Webflow sync, pageviews & more.
NEW

How can I automatically enable hyphenation for long words or links in Webflow to ensure they are fully displayed on mobile devices without the need for multiple text blocks or hard-coded hyphens?

TL;DR
  • Set white-space to normal and overflow to visible in Webflow's Typography settings.
  • Add a custom attribute with style: hyphens: auto; to text elements or use global CSS.
  • Set the lang attribute on the Body element for accurate language-specific hyphenation.

To prevent long words or links from breaking your layout on mobile, you can enable automatic hyphenation in Webflow using native typography controls and minimal custom CSS.

1. Use Webflow Typography Settings First

  • In the Style panel, select the text element (e.g., Paragraph, Heading, Link Block).
  • Scroll to the Typography section.
  • Set White Space to Normal (not No Wrap).
  • Set Overflow to Visible to allow text wrapping.

Webflow doesn’t include a built-in toggle for hyphenation yet, so you’ll need to use a small CSS override.

2. Add CSS for Hyphenation with a Custom Attribute

  • Select the text element where you want hyphenation.
  • Go to the Settings panel and add a custom attribute:
  • Name: style
  • Value: hyphens: auto;

This applies inline CSS to that element — hyphens: auto; enables browser hyphenation based on the user's language settings.

3. Optional: Set Language for Better Hyphenation

  • Select the Body element.
  • Go to the Settings panel.
  • Under the Custom Attributes, set:
  • Name: lang
  • Value: your target language code (e.g., en, de, fr).

This helps browsers know how to properly hyphenate based on dictionary rules.

4. Alternative: Use an Embedded Style Tag (Advanced)

If you want to apply hyphenation globally to all body text:

  • Go to Page Settings > Inside tag.
  • Add: <style>p, h1, h2, h3, h4, h5, h6 { hyphens: auto; overflow-wrap: break-word; } </style>

This method applies CSS globally without needing to add custom attributes to each element.

Summary

To enable automatic hyphenation in Webflow, apply hyphens: auto; via a custom attribute on your text elements or through a global CSS block. Also, ensure white-space is normal and set the language attribute to improve results on mobile layouts.

Rate this answer

Other Webflow Questions