Webflow sync, pageviews & more.
NEW

How can I automatically hyphenate long words on my Webflow site, specifically in the "NDIS Services" section on the homepage? I have tried using a CSS code snippet on H3 but it doesn't seem to have any effect. Any suggestions or insights would be greatly appreciated. Thank you!

TL;DR
  • Apply hyphens: auto, overflow-wrap: break-word, and appropriate word-break to the target element via custom CSS if needed.
  • Ensure the lang attribute (e.g., en) is correctly set on the <body> or container element.
  • Use a font that supports hyphenation and test with actual long words in supported browsers.

You're trying to automatically hyphenate long words in the "NDIS Services" section of your homepage, but applying a CSS rule to the <h3> hasn't worked. Here's how to correctly set up hyphenation in Webflow.

1. Enable Hyphenation via CSS

  • Use the CSS property hyphens: auto; on the specific element (e.g., <h3> or any other tag).
  • Also set word-break: normal; or word-break: break-word; (depending on design needs).
  • Ensure overflow-wrap: break-word; is applied to help with natural line breaking.

2. Ensure Correct Language Setting

  • Hyphenation depends on the language attribute (lang) being set properly.
  • Go to the Webflow Designer, select the <body> or page-level wrapper, then:
  • In the Settings Panel, set the Language attribute (e.g., en for English).
  • Without the correct lang, auto-hyphenation will not apply.

3. Apply Custom Code in Project/Page Settings

  • If you used the Webflow Designer to apply CSS but it's not working, try injecting the CSS manually.

  • Go to Project Settings > Custom Code > Head and add:

    ``

  • Or, if you're targeting a class (e.g., .ndis-heading), use that instead of h3.

4. Use a Supported Font

  • Some web fonts don’t support hyphenation well.
  • Make sure you're using a font that supports automatic hyphenation, such as system fonts or commonly supported ones (like Roboto or Lato).

5. Check Browser Compatibility

  • Hyphenation behavior may vary slightly across browsers.
  • Chrome, Safari, Edge, and Firefox generally support hyphens: auto if lang is properly set.

6. Test with Real Long Words

  • Make sure the content has actual long compound words that need breaking.
  • Hyphenation won’t show results if the words naturally fit within the container.

Summary

To auto-hyphenate long words in the "NDIS Services" section, apply hyphens: auto with proper lang attributes, use supportive CSS properties like overflow-wrap: break-word, and ensure you're using hyphen-friendly fonts. Add your styles via custom code if the Designer isn’t applying them correctly.

Rate this answer

Other Webflow Questions