Webflow sync, pageviews & more.
NEW

Can the underline color in a text link be changed in Webflow without altering the text color?

TL;DR
  • Assign a custom class to your text link in Webflow.
  • Add custom CSS with your desired text-decoration-color in the Page or Project Settings under the Before tag section.
  • Publish your site to see the changes live, as the Designer won't show the styled underline.

Yes, you can customize the underline color of a text link in Webflow, but it requires using custom CSS because Webflow’s visual interface doesn’t let you style underline colors separately by default.

  • Select the Text Link in the Webflow Designer.
  • Go to the Style panel and give it a custom class name, such as custom-underline.

2. Insert Custom CSS in the Page or Site Settings

  • Go to Page Settings (if it's for one page) or Project Settings > Custom Code (for site-wide changes).

  • Paste the following line in the Before tag section:

    <style>.custom-underline { text-decoration: underline; text-decoration-color: red; }</style>

  • Replace red with the underline color you want to use (e.g., #FF6600 or rgba(255, 0, 0, 0.5)).

3. Publish Your Site

  • The style won’t show in the Webflow Designer, so you need to Publish your site to see the effect applied in the browser.

Summary

Webflow doesn’t support underline color changes natively, but you can control it using custom CSS with text-decoration-color. Assign a unique class to your text link and define the color via custom code for full control.

Rate this answer

Other Webflow Questions