Site logo

Archived topic

Change CSS on a specific page contact form

3 replies · Started by Leonardo on July 26, 2022

Viewing posts 1–4 of 4

Hello how are you?

I want to change the field title color of a form in WPforms.

However, I already have another form on another page of the same site with a different color.

How do I change the CSS for that particular form?

I tried adding an additional class called "form-contact-class" , but it's not working...

See below all the code that changes the colors but in a global way:

div.wpforms-container-full .wpforms-form .wpforms-field-label {
color: #4d4d4d;
}

Below is the code I tried to add but it doesn't work:

div.wpforms-container-full .wpforms-form .wpforms-field-label .form-contact-class {
color: #4d4d4d;
}

If you can help me, I would be very grateful!

Hi there,

Normally this would be a question for the plugin's support team as it's a plugin specific CSS.

However, you can target your CSS to specific page.

For example, if this selector works globallly:
div.wpforms-container-full .wpforms-form .wpforms-field-label

then this would work for a specific page with the id xxx:
body.page-id-xxx div.wpforms-container-full .wpforms-form .wpforms-field-label

Hope this helps :)

Amazing, it worked!

But, then what I tried to do using the WordPress additional classes feature was "very" wrong?

Can you link us to the page where we can see this form? It just might be that the selector is wrong which is why your class isn't working when targeting the element.

This archived topic is closed to new replies.