Gravity Forms CSS Conflicts

Hello - I’m having a Gravity Forms styling issue and have received the following reply from GF -

Your theme is overriding many of the default GF CSS styles with its own rules, for example the margins for the complex fields sublabels: https://www.dropbox.com/s/3ydrn98inyzycpu/2019-3212-e3a9fbe9-4563-4831-bb0f-388ec0c62f6a.png?dl=0

Currently using X Theme - Integrity Stack

Please help with this problem

Hi There @aalkemist,

Thanks for writing in! I see that you’re using Integrity light stack. Yes, there are some default style-sheets included by X theme for gravity forms. You can locate it under the following file.
/wp-content/themes/x/framework/dist/css/site/gravity_forms/integrity-light.css

Since the CSS in that file is minified, you can use the following tool to unminify it (https://unminify.com/).

To override those default styles, you can setup a child theme first (https://theme.co/apex/forum/t/setup-how-to-setup-child-themes/57) and then add your own custom CSS rules into your child theme’s style.css file.

Hope that helps.

Thank you for the information, I don’t want to add custom css for GF I just want to stop the theme from interfering - is there a way to do this easily?

Hi @aalkemist,

Please install and activate the child theme and login through FTP then edit the functions.php then add this code:

add_action('init', 'no_x_gravity_form_css', 9999999);
function no_x_gravity_form_css () {
  wp_dequeue_style( 'x-gravity-forms' );
}

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.