Knowledge Base - Experlogix Documents

Styling Web Forms with Custom CSS

You can customize the appearance of a Web Form with your own CSS styles. Custom CSS lets you go beyond Themes and the built-in Bootstrap classes, to change, for example, the color, size, or spacing of specific components.

CSS is a standard web technology. Which styles you can use depends on the browser that displays the Web Form. For an introduction to CSS, see the MDN CSS documentation.

Before you add custom CSS, check Experlogix Documents Themes. Themes let you change the color palette of a Web Form in the user interface, without writing CSS. Themes are available if your license includes them.

The recommended way to add custom CSS is to store your CSS rules in a file in Content Manager and import the file into your Web Forms. You maintain the styles in one file, and every Web Form that imports it uses the latest version. You can also add CSS rules directly in a Web Form, for example to style a single Web Form or to try out styles.

How Custom CSS Works

To style a Web Form, you add CSS rules to it. Each rule starts with a selector that defines which components to style, followed by the styles to apply. For example, in the rule .makered { color: red; }, .makered is the selector and color: red; is the style.

You can select components in the following ways:

  • Specific components using your own class: In the settings of each component that you want to style, on the Display tab, in Custom CSS Class, enter a class name, for example makered. In the CSS rule, use the class name with a leading period: .makered. Use this approach to style only some components.

  • Components by type or key, using built-in classes: Each component automatically has a CSS class based on its type and a CSS class based on its key. These classes let you select all components of a specific type or an individual component without assigning your own classes. The key of a component is displayed in Property Name on the API tab of the component settings.

  • All components of the Web Form: Start the selector with the CSS class of the Web Form's root element to apply styles to the entire Web Form.

To find the built-in classes of the Web Form, of a component, or of a specific part of a component, see Finding the Classes of a Component.

A rule styles only the components that match its selector. If the selector uses your own class and no component has that class, the rule has no effect.

Custom CSS applies to the entire page that displays the Web Form, including the Experlogix Documents interface around it. Always start your selectors with your own class or a built-in class of the Web Form or its components so that the styles affect only the Web Form.

For example, the rule label { color: red; } also changes the labels in the Experlogix Documents interface.

Some parts of a component, such as input fields, have their own styles and do not use the styles of the component. To style them, add their class to the selector.

For example, .makered .form-control selects the input fields of the components that have the makered class.

Recommended: Import CSS from a File in Content Manager

This is the easiest way to style your Web Forms and keep their appearance consistent. You write your CSS rules once, in a single file, and use them in as many Web Forms as you need. When you update the file, all Web Forms that import it are updated automatically, so you do not need to edit each Web Form.

  1. Create a file with the .css extension that contains your CSS rules, and upload it to Content Manager.

  2. Create a share link for the file:

    1. In Content Manager, select the ellipsis (...) next to the CSS file, and then select Share.

    2. Select View in browser.

    3. Under Expiration Date, select Never.

    4. Select Create and copy the generated link.

      Screenshot 2026-11-26 093503-20261126-083503.png
  3. In the Web Form designer, drag an HTML Element component from the Layout components onto the Web Form.

  4. On the Display tab, in the HTML Tag field, enter style.

  5. In the Content field, enter the following line, and replace your-share-link with the share link that you copied:

    CSS
    @import url("your-share-link");
    

    If the Content field also contains other CSS rules, place the @import line first.

    image-20261126-113307.png
  6. Save the component.

  7. If your CSS rules use your own classes, assign the classes to the components: in the settings of each component that you want to style, on the Display tab, in Custom CSS Class, enter the class name without the leading period, for example makered.

    image-20261126-113448.png
  8. Save the Web Form.

The HTML Element component is not visible on the Web Form. Its styles apply when the Web Form is displayed.

To update the styles, upload a new version of the CSS file with the same name to the same folder. All Web Forms that import the file use the updated styles without any changes to the Web Forms.

Note: Anyone with the share link can access the CSS file without signing in. If the link expires or is deleted, the styles no longer apply to the Web Forms. Each time a Web Form loads the file, a view is recorded in the share link analytics. For details on share links and the required permissions, see Details Page Shares Tab.

Alternative: Add CSS Directly in the Web Form

Use this option to style a single Web Form or to try out styles before you add them to a CSS file.

  1. In the Web Form designer, drag an HTML Element component from the Layout components onto the Web Form.

  2. On the Display tab, in the HTML Tag field, enter style.

  3. In the Content field, enter your CSS rules. For example, the following rule displays in red the components that have the class makered:

    CSS
    .makered {
      color: green;
    }
    
image-20261126-114013.png
  1. Save the component and the Web Form.

Examples

Example: Styling Specific Components with Your Own Class

This example displays the Street and Town components in red. Other components are not affected.

  1. Open the settings of the Street component. On the Display tab, in Custom CSS Class, enter makered.

  2. Repeat step 1 for the Town component.

  3. Add the following rules to your CSS file or directly in the Web Form:

    CSS
    .makered {
      color: red;
    }
    .makered .form-control {
      color: red;
    }
    

    The first rule displays the labels in red. The second rule displays the text entered in the input fields in red.

    image-20261126-114213.png

Example: Styling a Part of a File Component

This example changes the text color of a File component to red, and then applies red only to the File Name column header.

  1. Open the settings of the File component. On the Display tab, in Custom CSS Class, enter makered.

  2. Add the following rule to your CSS file or directly in the Web Form:

    CSS
    .makered {
      color: red;
    }
    

    The text of the File component, such as its label and column headers, displays in red.

  3. To style only a specific part of the component, add the class of that part to the selector. For example, to apply red only to the File Name column header, replace the rule with the following one:

    CSS
    .makered .col-md-9 {
      color: red;
    }
    

Finding the Classes of a Component

To find the classes of the Web Form, of a component, or of a specific part of a component, open the Web Form in your browser, right-click the element, and select Inspect. Component classes can change depending on the component settings. For example, the File Name column of a File component uses a different class when file types are configured.

If the Styles Do Not Apply

  • If the @import line or your CSS rules are displayed as text on the Web Form, make sure that HTML Tag of the HTML Element component is set to style.

  • If the selector uses your own class, make sure that the class is entered in Custom CSS Class of the component. Enter the class name without the leading period, for example makered, not .makered.

  • To style the text entered in input fields, add .form-control to the selector.

  • If you copied the CSS from another source, open the Content field and make sure that it does not contain unexpected characters, such as \r\n. If it does, enter the rules again.

  • If you import a CSS file, make sure that the share link has not expired or been deleted, and that the @import line is placed first in the Content field.