max-font-size
with clamp(min, preferred, max)
for responsive font sizing.Your custom code for a max-font-size
in Webflow isn’t working properly across different screen sizes, likely due to how CSS handles responsive units or conflicts with Webflow's native styles. Here’s how to troubleshoot and fix the issue.
<style>
tags and placed within the before or before section.
max-font-size
is not a valid CSS property unless used inside a clamp()
or scoped custom property calculation.clamp()
Correctlymax-font-size
by itself is not a valid CSS property. Instead, use clamp(min, preferred, max)
to define responsive font sizes.font-size: clamp(16px, 2vw, 24px);
!important
.!important
(e.g., .my-heading { font-size: clamp(...) !important; }
).h1
) without a class, especially if Webflow generates additional styling.clamp()
rule is applied or being overridden.Your max-font-size
issue is likely due to incorrect property usage—max-font-size
isn’t valid CSS. Use clamp()
for responsive font sizing, ensure your selectors are specific, avoid Webflow overrides, and test across screen sizes using DevTools. Always publish to test custom code changes properly.