How to Modify Webflow's Default Underline for Better Readability

Tutorial
3 min
Published on Sep 06, 2023
Updated on
How to change the default underline in Webflow for better readability
Use AI to summarize this article
Key points

Introduction

In a Webflow project at Digidop, we believe that every detail matters. However, there are times when some default elements in Webflow can cause minor issues. This is precisely what we will address in this article.

If you are accustomed to developing websites on Webflow, you may have already noticed that the default underline is very close to the text (much closer than the default underline in a Figma mockup, for example), which can affect the aesthetics and readability of your designs.

But don’t worry, we have the solution to this problem, and it is extremely simple as it only involves a tiny line of custom CSS code that you can consistently integrate into your Webflow sites.

In this article, we will show you how to easily incorporate this adjustment into your projects. Let’s get started!

The Default Underline Issue in Webflow

The default underline in Webflow is actually very close to the text itself, almost merging with the letters, which can create an aesthetic that doesn't always align with your design vision.

To illustrate this, let’s compare it with the default underline in Figma mockups:

Webflow Underline vs Figma Underline

When you create underlined text in Figma, you’ll notice that the underline is positioned lower, which enhances the overall readability of the text. In contrast, in Webflow, the rendering is not the same, and that’s where we come into play.

The Quick Solution with Custom CSS Code

Now that the problem is identified, let’s move on to the solution. Fortunately, this solution is incredibly straightforward: all you need is a line of custom CSS code.

The magic line we will use is as follows:

body {text-underline-offset: .25em;}

By adding this to your Webflow project, you adjust the gap between the text and the underline to 0.25em (a relative unit of measurement based on the font size).

To apply this effect to your site, follow these steps.

If you’re using the Client-First cloneable:

  • From the Designer browser, open the Global Styles component, then the Embed inside to access the global styles of Client-First.
Webflow, Client-First Global Styles
  • Once opened, scroll to the top of the Embed to the styles that enhance readability.
Webflow, Client-First Text Enhancement
  • Finally, just add the following line to the Body element (as shown in the image).
text-underline-offset: .25em;
Webflow, Client-First Underline

If you are creating a project from scratch and not using the Client-First cloneable:

  • Open the site settings and go to the Custom Code tab.
  • Copy and paste the following code into the header:
<style>
body {text-underline-offset: .25em;}
</style>
Webflow, Site Settings Underline

You can also, similar to the Client-First setup, create a global Embed in which to add this custom code so that the styles are visible in the Designer (adding CSS in the custom code in the page or site settings will not show the changes in the Designer).

Lastly, after adding the line of code and possibly adjusting the value, make sure to publish your site. It’s as simple as that!

Conclusion

Congratulations! You now have a new simple yet very practical tip in your Webflow toolkit.

Every little detail matters in creating an exceptional user experience: adjusting the underline is no exception as it contributes to making your website text more aesthetically pleasing and readable.

To delve deeper, read our latest articles:

…or check out our YouTube channel!

Lucas Clairet
Lucas Clairet
Webflow Team Lead

Suggested articles

Abstract illustration of an AI-powered marketing team, featuring a grid of purple and beige squares representing automation, connected workflows, and human-AI collaboration.
News
AI

The New Marketing Teams: What AI Has Actually Changed in How They Work

The New Marketing Teams: What AI Has Actually Changed in How They Work
Webflow vs. custom development with a headless CMS, illustrated by the Webflow Designer and a code editor.
Documentation
Development

Webflow vs. Custom Development (Next.js, Astro): 6 questions to make the right choice

Webflow vs. Custom Development (Next.js, Astro): 6 questions to make the right choice
PHP2Shell visual: CVE-2026-109618 and CVE-2026-109619 rated 9.2, terminal of a WordPress server on PHP 8.1 with no patch, Webflow site not affected
News
Webflow

PHP2Shell critical PHP vulnerability: what to do about your WordPress site, and should you move to Webflow?

PHP2Shell critical PHP vulnerability: what to do about your WordPress site, and should you move to Webflow?
Every great website  
starts with a conversation
Abstract composition of black and gold metallic ribbons with elegant light reflections and smooth gradients. A premium background conveying luxury, modernity, and innovation.