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.

How do I center the entire form?

  1. ciznerguy
    Member

    Is there an easy way to center the entire form?

    Posted 7 years ago on Thursday July 26, 2012 | Permalink
  2. Here is an example where I centered all the inputs in a form:
    http://gravity.chrishajer.com/contact-us/

    Here is the CSS I used to do it:

    [css]
    body #gform_wrapper_32 {
    width:598px;
    border:1px solid #C2C2C2;
    padding:5px;
    }
    body #gform_wrapper_32 .gform_heading span.gform_description {
    color:red;
    display:block;
    text-align:center;
    }
    body #gform_wrapper_32 .gform_body ul li.gfield {
    text-align:center;
    }
    body #gform_wrapper_32 .gform_footer input[type='submit']  {
    color:#FFFFFF;
    background:red;
    float:none;
    display:block;
    width:140px;
    margin:0 auto;
    }

    Your CSS may be different depending on the type of fields in your form. This CSS applies only to form 32, so be sure to change that to your form ID if you choose to implement something like this.

    Posted 7 years ago on Friday July 27, 2012 | Permalink
  3. that's an easy way?

    it really is a shame there aren't any global ways to change a font color, font size, background color, alignment, etc.

    I gave up trying to change the background color on my 1 form because no matter what I tried I could get the state dropdown and paragraph text area to change like all the other areas.

    I'm in the market for a new form plugin if anyone has suggestions.

    Posted 7 years ago on Thursday September 13, 2012 | Permalink
  4. There is a global way to make changes to the Gravity Forms styles. Add the rules to your theme's stylesheet and make them specific enough that they override all other rules (or use the !important declaration to ensure this new rule is honored.)

    If you'd like help styling your form, please post a link to it with an explanation of how we can help make the changes you want to see.

    Posted 7 years ago on Thursday September 13, 2012 | Permalink