How to style elements with classes on Webflow
Style elements in Webflow by selecting an element, creating or applying a class name in the Style panel, then modifying CSS properties. Classes allow you to reuse styles across multiple elements and maintain consistent design throughout your project.
Prerequisites
- Basic Webflow account
- Understanding of HTML elements
- Knowledge of CSS properties
- Webflow project created
Step-by-Step Instructions
Select the element you want to style
Create a new class or apply an existing one
- Type a new class name (use descriptive names like
hero-buttonormain-heading) - Select an existing class from the dropdown list
- Press Enter to create the class
Access the styling properties
- Layout - Display, position, flexbox settings
- Spacing - Margin and padding
- Size - Width, height, min/max dimensions
- Typography - Font family, size, weight, color
- Backgrounds - Background colors, images, gradients
- Borders - Border styles, radius, shadows
Modify typography properties
- Click the font dropdown to change the Font family
- Adjust Font size using the input field or slider
- Set Font weight (100-900 or named weights)
- Choose Text color by clicking the color swatch
- Modify Line height, Letter spacing, and Text align as needed
Adjust layout and spacing
- In Layout, set the display type (block, inline-block, flex, etc.)
- In Spacing, click the margin/padding icons to add space around or inside the element
- In Size, set width and height values (use % for responsive, px for fixed)
- Use the visual margin/padding editor by clicking the diagram
Apply background and border styles
- In Backgrounds, click the + button to add a background color, gradient, or image
- In Borders, set border width, style (solid, dashed, etc.), and color
- Add Border radius for rounded corners
- Apply Box shadow or Text shadow for depth effects
Preview and apply to other elements
- Click Preview in the top toolbar to see your changes in action
- To apply the same class to other elements, select them and choose your class from the class dropdown
- Use Combo classes to create variations by adding a second class name
- Publish your site to see the final result
Common Issues & Troubleshooting
Class changes aren't visible on the element
Check if you have the correct breakpoint selected in the top toolbar. Styles may be overridden by higher specificity classes or inline styles.
Can't find the class I just created
Make sure you pressed Enter after typing the class name. Check the Style Manager panel to see all your classes and their usage.
Element styling looks different on published site
Clear your browser cache and ensure you've published the site. Check for conflicting custom CSS code in the Project Settings.
Changes affect other elements unexpectedly
This happens when multiple elements share the same class. Create a new class or use combo classes to target specific elements without affecting others.