Additional Classes

The Additional Classes setting in the Cost Calculator Builder allows users to customize the appearance of elements by adding CSS classes. This feature provides flexibility for users to style elements according to their website’s design.

What Are CSS Classes?

CSS (Cascading Style Sheets) classes are used to apply specific styles to HTML elements. By assigning a CSS class to an element, you can control its appearance, such as its color, size, or position, using the class name in your CSS stylesheet.

Each element within the Cost Calculator Builder has a field labeled Additional Classes in its settings. Users can input the names of their custom CSS classes into this field to apply specific styles to those elements.

But these classes should be defined in your WordPress beforehand.

How to define Additional Classes on WordPress?

  1. Follow WordPress Dashboard > Appearence > Themes and click on Customize:

  1. Open Additional CSS tab:

  1. Define your CSS classes to the designated area and Publish them:

Here is the example of the CSS classes that hides buttons and changes the color of the title

.custom-style-for-quantity .calc-item__title span {
  color: red;
}

.custom-style-for-quantity .input-number-counter {
  display: none !important;
}

Adding Additional CSS in Cost Calculator

As an example let's add the custom CSS class to some quantity field.

  1. Open the settings of the quantity field, enter the name of the CSS class without dot (.) beginning:

If you want to add multiple CSS classes, separate them with space!

  1. Here is the result of our CSS:

You can check the CSS classes via Developer Tools on your browser:

Last updated