• Resolved MDC2957

    (@mdc2957)


    I’ve been working at this for several hours trying to figure out how to use the “custom class” feature so that I can use CSS to make different style for my form. I couldn’t find anything in the documentation. Do you have any info?

Viewing 3 replies - 1 through 3 (of 3 total)
  • You can add a custom class name in the field marked Custom Class, this will simply add that class to whichever form element you have chosen to add it to.

    You can then apply custom styling to it using that class name, like so:

    Custom Class: my-class

    In your Child Theme style.css file, or using a Custom CSS plugin, add this (example) CSS code:

    .my-class {
        color: #f00;
    }

    This would change the text color to Red for your chosen elements.

    Hope this helps.

    Thread Starter MDC2957

    (@mdc2957)

    I don’t need to use any other classes I saw like caldera-grid or btn, etc?

    Not unless you’re using the same class for multiple elements then it’s not required, you can just target the custom class you add to each element as needed.

    If you apply the same class to a button and to a field for example, then yes you’ll need to differentiate the difference between the two elements that are using the same custom class.

    You can use tools like Firebug to inspect the code of your site and find classes of any specific form elements such as buttons etc..

    Hope this helps.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom Class documentation?’ is closed to new replies.