If you’ve ever wanted to change the look of a specific element in your microsite — make one button stand out, add a background color to a single section, or adjust spacing between blocks — you’ve run into the need for CSS classes.
CSS classes are the most practical way to control the appearance of individual elements in a microsite without redesigning the entire page. They give you the flexibility of custom styling with the consistency of a design system.
Ready to go digital?
Discover how Zoomforth can help you.
Join 500+ enterprise sales, marketing and HR teams building trackable microsites — no developer needed.
Rated 4.5/5 on G2 · Trusted by Fortune 500 teams
What are CSS classes and why do they matter in microsite design?
A CSS class is a set of style rules grouped under a name. You define the class once — for example, a class that adds a blue background, white text, and rounded corners — and then apply it to any element in your microsite. Every element with that class will look the same, instantly.
For microsite creators, this means:
- Consistency across pages. Apply the same class to buttons on every page and they’ll all match without manual effort.
- Fast updates. Change one class definition and every element using it updates. No need to edit each section individually.
- Design flexibility. Mix and match classes on different elements to create unique layouts while staying within your design system.
How CSS classes differ from inline styles
Inline styles are CSS rules applied directly to a single element. They look like this: style="color: blue; font-size: 18px;". The problem? You have to repeat them for every element you want to style, and changing them means editing every instance.
CSS classes, by contrast, are defined once and applied by name. If you decide that all your primary buttons should be green instead of blue, you change one line in the class definition — not 50 individual button styles.
For enterprise microsite programs, this distinction matters. Classes are how you maintain design consistency across hundreds of microsites created by dozens of team members.
Common CSS classes for microsite elements
Here are the types of CSS classes most frequently used in microsite design and what they control:
| Class type | What it controls | Example use case |
|---|---|---|
| Typography classes | Font size, weight, color, line height | Headings, body text, captions |
| Background classes | Background color, gradient, or image | Section backgrounds, hero areas |
| Button classes | Shape, color, size, hover state | Primary and secondary CTAs |
| Spacing classes | Margin and padding | Section gaps, text indentation |
| Layout classes | Width, alignment, display behavior | Centered content, two-column layouts |
| Border classes | Border width, color, radius, style | Cards, dividers, image frames |
Best practices for organizing CSS classes in microsites
Use descriptive names
Name your classes based on what they do, not how they look. Instead of .blue-text, use .highlight-text or .section-title. This way, if the design changes from blue to green, the class name still makes sense.
Keep classes focused
A single class should do one thing well. If you find yourself creating a class that controls font size, color, spacing, and borders, consider splitting it into multiple classes that can be combined. This gives you more flexibility and makes your design system easier to maintain.
Combine classes for complex styling
Most microsite builders let you apply multiple classes to a single element. Use this to your advantage: combine a .section-padding class with a .dark-background class and a .centered-content class to build complex layouts from simple, reusable pieces.
Document your classes
If your team uses custom CSS classes, keep a reference of what each class does and where it should be applied. This makes it easier for team members to use the right classes and for new team members to get up to speed.
How to get started with CSS classes in your microsite builder
If your microsite builder supports custom CSS (most enterprise platforms do), here’s a simple workflow:
-
Start with your theme. Define the core visual styles — colors, fonts, spacing — in your theme settings. This covers 80 percent of what you need.
-
Identify repeated patterns. Notice elements that appear in multiple sections or pages — a specific button style, a section background, a text treatment. Create a CSS class for each pattern.
-
Test on a single page. Apply your new classes to one microsite and check how they render on desktop, tablet, and mobile.
-
Create a template. Once your classes are working well, save the microsite as a template so your team can use the same classes on new sites without redoing the setup.
In Zoomforth, you can add custom CSS classes through the theme editor or directly in the page settings. The visual editor lets you apply existing classes to any element without writing code, while the custom CSS panel gives you full control for advanced styling needs.
Ready to build a microsite with custom styling? Request a demo to see how Zoomforth handles CSS classes and theme customization.
Frequently asked questions
What is a CSS class?
A CSS class is a reusable style rule that you can apply to any element on a web page. Instead of styling each heading or button individually, you define a class once — like .blue-heading or .rounded-button — and apply it wherever you need that style. This keeps your design consistent and your code clean.
How do CSS classes help with microsite design?
CSS classes let you apply consistent styling across your entire microsite without repeating yourself. You can define a class for your section backgrounds, another for your call-to-action buttons, and another for your text blocks. Apply them to any element and the styling is automatic. Change the class definition once and every element using it updates instantly.
Do I need to know how to code to use CSS classes in a microsite builder?
In most enterprise microsite builders, you don't need to write CSS from scratch. Platforms like Zoomforth let you apply pre-defined CSS classes through a visual editor. For advanced customization, you can add your own CSS classes — but many common design needs (colors, spacing, borders) are handled through the theme editor without touching code.
What are the most common CSS classes used in microsite design?
Common CSS classes include those for typography (heading styles, body text), buttons (primary, secondary, hover states), spacing (section padding, margins), backgrounds (colors, gradients, images), borders (border-width, border-color, border-radius), and responsive behavior (hide on mobile, stack on tablet).