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.

CSS Question

  1. Do you have some example CSS that will show just how it should look?

    I'd like to see how to put certain fields next to each other, such as town & county.

    Also, is it possible to have have different CSS for each form?

    Posted 14 years ago on Friday September 24, 2010 | Permalink
  2. I'm not sure what you're referring to with the first question. Just how what should look? the form itself or just some element. The styles are intentionally generic, meant to work in tandem with and inherit styles from your theme to some extent.

    As far as the second question, you can use CSS floats to position elements along side of each other. There are several threads on the forum about just that. Here's a link to one with a few more details.

    http://forum.gravityhelp.com/topic/2-fields-next-to-each-other#post-7449

    Lastly, yes, you can specify different styles for each form if you would like to by using CSS inheritance from the main form wrapper. Each form has a wrapper div with a unique ID that you can use to cascade down and change the rules for every element if you want.

    for example - Form ID 1:

    #gform_wrapper_1 input[type=text] {background-color:green}

    for example - Form ID 5:

    #gform_wrapper_5 input[type=text] {background-color:yellow}

    We prepared a visual CSS guide that may help you better understand the overall form structure. You can find it at the link below.

    http://www.gravityhelp.com/documentation/visual-css-guide/

    if you're not that familiar with using CSS inheritance and specificity, this is a good article to read up on it.

    http://www.smashingmagazine.com/2010/04/07/css-specificity-and-inheritance/

    Posted 14 years ago on Friday September 24, 2010 | Permalink