Never Set Mobile & Tablet Font Sizes Again! (CSS Clamp + Elementor)

Are you tired of setting font sizes for desktop, tablet, and mobile separately in Elementor? 🤯

Are you looking to get more leads through your website?

Never Set Mobile & Tablet Font Sizes Again! (CSS Clamp + Elementor)


What is CSS Clamp?

Here’s the magic: it’s called clamp().

Clamp lets you set three values for your font size:

  • a minimum size so it never gets too small
  • a scaling size that grows and shrinks with the screen
  • and a maximum size so it never blows up too big

Example for a heading:

font-size: clamp(40px, 5vw, 70px);

Now instead of managing three device breakpoints, you set it once — and it just works everywhere.


Why CSS Clamp is the Future

Here’s why clamp is considered the future of typography:

  1. One line, all devices – no more setting separate font sizes for desktop, tablet, and mobile.
  2. Truly fluid fonts – text scales smoothly as the viewport changes, no jumps.
  3. Less code, easier maintenance – replace multiple media queries with a single line.
  4. Future-proof – works on any screen size, today and tomorrow.
  5. Better readability & UX – headings and body text stay perfectly sized everywhere.

Step 2 – Update Your Fonts to Use Clamp

2a – Set or Update Global Fonts

  1. Open Elementor → Site Settings → Global Fonts.
  2. Update or set typography for all text types (H1–H6, Body, Small, etc.).

2b – Add Sample Typography to Test

Copy and paste this into a Text Editor widget to preview all headings and body text:

<h1>H1 - Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum is simply dummy text of the printing and typesetting industry.</h1>
<h2>H2 - Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum is simply dummy text of the printing and typesetting industry.</h2>
<h3>H3 - Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum is simply dummy text of the printing and typesetting industry.</h3>
<h4>H4 - Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum is simply dummy text of the printing and typesetting industry.</h4>
<h5>H5 - Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum is simply dummy text of the printing and typesetting industry.</h5>
<h6>H6 - Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum is simply dummy text of the printing and typesetting industry.</h6>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>

Step 3 – Collect Existing Font Sizes

Locate your current desktop, tablet, and mobile font sizes in Elementor. Example hierarchy:


H1 – Desktop: 72px | Tablet: 60px | Mobile: 50px
H2 – Desktop: 50px | Tablet: 45px | Mobile: 40px
H3 – Desktop: 40px | Tablet: 30px | Mobile: 26px
H4 – Desktop: 30px | Tablet: 25px | Mobile: 22px
H5 – Desktop: 24px | Tablet: 20px | Mobile: 18px
H6 – Desktop: 20px | Tablet: 18px | Mobile: 16px

Step 4 – Convert to CSS Clamp

Use the following rules to convert font-size values into clamp():

  1. Use px for the min (mobile) and max (desktop) values.
  2. Use vw for the scaling value (tablet).
  3. Add a unitless line-height for each heading to scale proportionally.
  4. Output each rule in a single line with a CSS comment for clarity.

/* H1 */ h1 { font-size: clamp(50px, 5vw, 72px); line-height: 1.2; } 
/* H2 */ h2 { font-size: clamp(40px, 4vw, 50px); line-height: 1.3; } 
/* H3 */ h3 { font-size: clamp(26px, 3vw, 40px); line-height: 1.3; } 
/* H4 */ h4 { font-size: clamp(22px, 2.5vw, 30px); line-height: 1.4; } 
/* H5 */ h5 { font-size: clamp(18px, 2vw, 24px); line-height: 1.4; } 
/* H6 */ h6 { font-size: clamp(16px, 1.5vw, 20px); line-height: 1.5; }

Copy and paste directly into Elementor Global Fonts or your Custom CSS for instant responsive typography.


Step 5 – Optional

  • If global fonts are not yet set, use the suggested starting values (link in video description).
  • Copy-paste snippets from the blog post for a faster workflow.

Step 6 – Test It

  1. Open Elementor’s Responsive Mode.
  2. Check Desktop, Tablet, and Mobile views.
  3. Notice how headings and body text scale smoothly without manual adjustments.
  4. Resize your browser to see real-time font scaling in action — no breakpoints needed.

Step 7 – Considerations Before Switching

Before updating all your fonts to fluid typography with clamp, keep these points in mind:

  1. Design consistency – clamp may affect tightly constrained elements like buttons or cards. Test first.
  2. Theme/plugin conflicts – some styles might override your fonts. Check for overrides.
  3. Minimum size matters – avoid making text too small on tiny screens.
  4. Animations – check behavior if you animate font sizes.

Even with these considerations, CSS clamp is a huge time-saver and future-proof approach.

Education & Insight

More from the blog

If you're looking for a WordPress web designer in Leeds, I also build conversion focused websites for businesses.

Free Website Audit. Delivered Straight to Your Inbox

Get a professional review of your website in 24 hours. I’ll highlight opportunities to improve messaging, layout, and lead generation, no obligations, no pressure, just actionable insights emailed directly to you.

Claim Your Your Ultimate High-Converting Website Checklist