By the end of this lesson your hero section goes from a bare skeleton to a polished, fully styled block — and you’ll do it the professional way, setting styles that ripple across the entire site instead of element by element. The stars of the show are HTML tags, fluid typography with clamp(), and combo classes.
The theme running through all of it is doing work once. Set the body font once and every element inherits it. Define a heading’s size once on its tag and every heading of that level follows. Build a button style once and reuse it with small variations. That discipline is the difference between a site you can maintain and one you dread touching.
We also lean hard into fluid design — type and spacing that scale continuously with the screen rather than snapping between fixed sizes. It looks like an advanced topic, but once you see the pattern, you’ll reach for it everywhere.
How it works
HTML tags are the foundation. Select the body element and you can open its “Body (All Pages)” tag; set the background color, font family, font color, and base font size there, and every page inherits them because every element is a child of the body. The same idea applies to “All H1 Headings”, “All Paragraphs”, and so on — style the tag once and every element of that type updates. That’s the single biggest accelerator in a Webflow workflow.
For type that feels alive, we use clamp(). It takes three values — a minimum, a preferred value, and a maximum — and the preferred value scales smoothly as the viewport moves between two widths (here, 375px up to 1920px). The reusable preferred value looks like 14px + 4px * ((100vw - 375px) / (1920px - 375px)): it’s 0 at the small width and 1 at the large one, so the size glides between your min and max. To reuse it for another element, you only swap the min, the max, and the difference between them. One formula, fluid everywhere.
Combo classes solve the “same but slightly different” problem. Our two buttons share a border radius, padding, and font — only the colors differ. Instead of duplicating the button class (which creates an independent copy you’d have to keep in sync), we add a combo class like cc-dark on top. It inherits everything from button and overrides just the colors, so a later change to the base still flows through. This is also where that orange label finally makes sense: click it and Webflow tells you exactly where a value is inherited from — a base class or an HTML tag.
The fluid mindset carries into spacing too. The ch unit caps a paragraph at a readable line length (max-width: 56ch), and the em unit scales gaps and padding with the element’s font size (a 1.2em gap grows and shrinks along with the text). Because the font sizes are already fluid, the spacing stays proportional automatically.
How to use it
- Set body defaults. Select the body, open the Body (All Pages) tag, and set the background color, font color (white here), your Google font (upload it from Site Settings → Fonts, only the weights you need), a base
font-sizeusing theclamp()formula above, andline-height: 1.5. - Style the label and heading. Give the label its own class and color. On the All H1 Headings tag, set
font-weight: 500,line-height: 1, aclamp()font size (min32px, max72px, difference40), and zero top/bottom margins. - Style paragraphs once. On the All Paragraphs tag, set the font color and remove the bottom margin. Give the hero subheading a
max-width: 56chso the line length stays readable. - Build the reusable button. Give the primary button the generic class
buttonwith padding (12px/16px),border-radius: 14px, a background color, and a 1px border in the same color (so both buttons end up identical in size). - Vary it with a combo class. Select the second button, add the combo class
cc-dark, and override just the background and border colors. Everything else stays linked tobutton. - Space with em. Set the heading wrapper’s flex
gapto1.2emso spacing scales with the fluid font size. Do the same for the social-proof wrapper. - Finish the image and check it. Cap the image wrapper’s
max-width(around1200px) and set its left/right margins toautoto center it. Open Preview mode (the play icon) to confirm the result behaves like the live site.
Your hero is now styled and fluid. Next up, we reuse everything we’ve built to create the features section — and meet Webflow components.