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.

Apply to all forms

  1. Hi,

    I have a bit of code that I am duplicating for all of my forms for formatting purposes. Can you suggest a way to simplify this so my settings apply to all forms? Otherwise I need to keep duplicating a portion each time I create a new form!

    [css]
    body #gform_wrapper_1 form {
         background: url('http://www.agilebts.com/wp-content/uploads/2013/01/Green-Form.png');
    ');
        padding: 10px;
          border:0px solid #cccccc;
    border-radius: 10px;
    
            box-shadow:  3px 3px 5px 1px rgba(100, 100, 100, .7);
    
    }
    
    /* make the form container relative for positioning */
    
    body #gform_wrapper_1 {
        position: relative;
    }
    
    /* resize and position the form footer with the button */
    
    body #gform_wrapper_1 .gform_footer {
        width: auto;
        position: relative;
        top: 15px;
        left: 0px;
        padding: 0;
        margin: 0;
    }
    
    .gform_wrapper .gform_body .gform_fields .gfield .gfield_label {color: #FFFFFF}
    
    body #gform_wrapper_3 form {
         background: url('http://www.agilebts.com/wp-content/uploads/2013/01/Green-Form.png');
    ');
        padding: 10px;
          border:0px solid #cccccc;
    border-radius: 10px;
    
            box-shadow:  3px 3px 5px 1px rgba(100, 100, 100, .7);
    
    }
    
    /* make the form container relative for positioning */
    
    body #gform_wrapper_3 {
        position: relative;
    }
    
    /* resize and position the form footer with the button */
    
    body #gform_wrapper_3 .gform_footer {
        width: auto;
        position: relative;
        top: 15px;
        left: 0px;
        padding: 0;
        margin: 0;
    }
    
    body #gform_wrapper_4 form {
         background: url('http://www.agilebts.com/wp-content/uploads/2013/01/Green-Form.png');
    ');
        padding: 10px;
          border:0px solid #cccccc;
    border-radius: 10px;
    
            box-shadow:  3px 3px 5px 1px rgba(100, 100, 100, .7);
    
    }
    
    /* make the form container relative for positioning */
    
    body #gform_wrapper_4 {
        position: relative;
    }
    
    /* resize and position the form footer with the button */
    
    body #gform_wrapper_4 .gform_footer {
        width: auto;
        position: relative;
        top: 15px;
        left: 0px;
        padding: 0;
        margin: 0;
    }
    
    body #gform_wrapper_5 form {
         background: url('http://www.agilebts.com/wp-content/uploads/2013/01/Green-Form.png');
    ');
        padding: 10px;
          border:0px solid #cccccc;
    border-radius: 10px;
    
            box-shadow:  3px 3px 5px 1px rgba(100, 100, 100, .7);
    
    }
    
    /* make the form container relative for positioning */
    
    body #gform_wrapper_5 {
        position: relative;
    }
    
    /* resize and position the form footer with the button */
    
    body #gform_wrapper_5 .gform_footer {
        width: auto;
        position: relative;
        top: 15px;
        left: 0px;
        padding: 0;
        margin: 0;
    }
    Posted 11 years ago on Friday January 25, 2013 | Permalink
  2. It seems as though right now you are targeting each form ID individually. Instead, you should just be able to use: .gform_wrapper in place of #gform_wrapper_#

    Posted 11 years ago on Friday January 25, 2013 | Permalink
  3. Cool, it looks like that worked. Thanks!

    Posted 11 years ago on Friday January 25, 2013 | Permalink

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