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.

Can I create a new Ready Class?

  1. Hi,

    I'd like to style a form, but not have it affect all of my forms.

    What would be the recommended way of doing this? Can I create a new Ready Class and then choose it? Can I override things like the margin and the width: 47% in the gform wrapper?

    Thanks so much. :)

    Posted 12 years ago on Wednesday March 21, 2012 | Permalink
  2. Hey Jason, sure. Overall - GF has a lot of ways you can select and hook onto elements with CSS. Care to share a link and/or some more detail with what exactly you are trying to achieve? I'd be happy to help you with the best way to tackle it after seeing the bigger picture.

    Posted 12 years ago on Wednesday March 21, 2012 | Permalink
  3. Hi Rob,

    Thanks. Here's a link to a little capture form I'm creating: http://simplemethod.ca/test/

    I'd like to style this in a number of ways that would set it apart from a normal form, including possibly the font, the input boxes – to be wider in relation to the available space in the div container they are in, and maybe some other things.

    I think that's it for now!

    Best Regards.

    Posted 12 years ago on Wednesday April 4, 2012 | Permalink
  4. Well, each form has a unique ID tied to it. If you view the form using Chrome Developer Tools or Firebug for Firefox, you'll see that, as well as each li and input has their own unique ID.

    So, you could just use those IDs to target individual elements, or you can use classes as well. Here is some more information on structure to help you with your selectors:

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

    Posted 12 years ago on Thursday April 5, 2012 | Permalink
  5. Thanks Rob, this has been working well.

    Just hit a snag however. Can you help me write the proper style rules to make the class gfield_label white for ids input_8_1 and input_8_1?

    Thank you very much for your help.

    Posted 12 years ago on Monday April 9, 2012 | Permalink
  6. No problem, try placing this into your theme's stylesheet:

    [css]
    li#field_8_1 .gfield_label, li#field_8_2 .gfield_label {
    color: white;
    }
    Posted 12 years ago on Monday April 9, 2012 | Permalink
  7. Thank you Rob, this was just what I was looking for. :)

    Posted 12 years ago on Monday April 16, 2012 | Permalink
  8. Right on, glad to help!

    Posted 12 years ago on Monday April 16, 2012 | Permalink

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