PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Change background color

  1. MarcelFenchel
    Member

    Is it possible to give the contact form a background color?

    Thanks for your help!

    Posted 8 years ago on Thursday June 30, 2011 | Permalink
  2. Sure, each form has a div "wrapper" element containing it and you can easily apply a background color to that.

    This would apply the background color to all of your forms.

    [css]
    body .gform_wrapper { background-color:yellow }

    and this would apply only to form ID #1. Note the _1 in the ID used below - you would replace that with your actual form ID

    [css]
    body #gform_wrapper_1 { background-color:yellow }

    You can more information on targeting form elements for styling manipulation in the documentation here.

    http://www.gravityhelp.com/documentation/page/CSS_Targeting_Samples

    Posted 8 years ago on Thursday June 30, 2011 | Permalink
  3. MarcelFenchel
    Member

    Thank you! But where do I find the "data file" to put in these changes?

    Posted 8 years ago on Monday July 4, 2011 | Permalink
  4. Can anyone suggest how I can change the color backgrounds for each section, so it is easier on the eyes to keep track of the sections? http://3pl-survey.supplychainheros.com/

    Posted 8 years ago on Friday July 15, 2011 | Permalink
  5. There are no default section "containers" like fieldsets. The section breaks are structured as a node in the same unordered list as the rest of the fields. If you want to wrap fields in actual containing elements be it fieldsets or divs, you will have to make use of the inline HTML fields to add your own markup. It's not really as difficult as it sounds and I've detailed how to do it here.

    http://www.gravityhelp.com/forums/topic/how-can-i-get-the-form-fieldsboxes-side-by-side#post-29423

    After you add your new containers, then you would target them by their unique ID and apply backgrounds or whatever other style properties you would like.

    Posted 8 years ago on Friday July 15, 2011 | Permalink
  6. MarcelFenchel
    Member

    Could you please tell me the name of the data-file where I can change the color of the contact form (for example "forms.css" or "form_display.php")? Thank you!

    Posted 8 years ago on Monday July 18, 2011 | Permalink
  7. @MarcelFenchel You wouldn't change ANY of the Gravity Forms files. You should never edit the Gravity Forms files. If you want to change any style elements you would do so by adding custom CSS to your themes stylesheet to target and style the form element you want to style.

    Kevin provided a link in a post above to the help guide for targeting and styling form elements. You can find it here:

    http://www.gravityhelp.com/documentation/page/CSS_Targeting_Samples

    We do not provide support for customized versions of Gravity Forms where a user has edited the core plugin files. All customizations should be done either via CSS you add to your themes stylesheet, or via the use of hooks and filters when it involves customizing something using PHP.

    Posted 8 years ago on Monday July 18, 2011 | Permalink
  8. MarcelFenchel
    Member

    Works now! Thanks.

    Posted 8 years ago on Monday July 18, 2011 | Permalink

This topic has been resolved and has been closed to new replies.