Please Note: We are no longer using forums to facilitate standard support. 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.

Beginner Question CSS / Stylesheets Etc.

  1. I've just installed GF today and created my first form. Here is the link to my post which contains the form. http://iamsinc.com/blog/its-spring-training-time-our-life-annuity-academy-will-get-your-business-in-top-shape/

    Specifically, I would like to have a light-gray background behind the form and have it centered in the post. I also don't know why the "I'm interested in learning more" text is red. That's probably pulling from my stylesheet?

    These are probably basic questions, but I searched the forum and couldn't find what I was looking for. Thank you,

    Posted 3 years ago on Thursday April 5, 2012 | Permalink
  2. For the background color you can use this (place into your theme's stylesheet):

    #gform_wrapper_1 {
    background-color: #ccc;
    }

    The heading (h3 tag) is inherting from your theme, as it should to match other h3 tags. If you want to change the color you can place this:

    .gform_title {
    color: black;
    }

    The form looks centered to me, its right in alignment with the content above it.

    Posted 3 years ago on Thursday April 5, 2012 | Permalink
  3. First of all, thank you for your lightning-quick response to my questions. I really appreciate that. Neither of these worked for me and I'm assuming it's something that I'm doing incorrectly.

    I am using the standard twenty eleven wordpress theme with a child theme for any changes. I added the two snippets you gave me to the child theme's style sheet, hit "update file", went back to my post and the changes didn't appear on the form.

    Also, re: the centering of the form. It is lined up with the post, but everything is aligned-left. This is only a very minor issue though and something I can work on later.

    I could be going about this entirely incorrectly. I appreciate any help you can give. Here is a link to my stylesheet for the child theme http://www.pastie.org/3735403

    Let me know what else you may need from me. Thank you,

    Posted 3 years ago on Thursday April 5, 2012 | Permalink
  4. No problem at all, glad to help out. It looks like you must be cached, I can see your changes alright:

    http://grab.by/cXsU

    Posted 3 years ago on Thursday April 5, 2012 | Permalink
  5. You're absolutely right. Thanks for pointing that out.

    In the future, if I want to add a custom color to another form, do I simply change the number on the #gform_wrapper line to match the ID number of the form?

    Also, what do I need to do so the text of the form and the fields aren't right on the left-hand side of the box. I appreciate your help. Thank you

    Posted 3 years ago on Thursday April 5, 2012 | Permalink
  6. Correct, you can just change the ID number and then hex color.

    Can you sketch out your ultimate goal for the form in terms of the alignment. I mean you can use padding/margin on various elements to push things off to the right.

    You could also you the left align label placement to take up some more of the space.

    Posted 3 years ago on Friday April 6, 2012 | Permalink
  7. The way the form is inside the gray wrapper now, everything starts immediately at the left margin. I would like to see what it looks like centered in the gray box and/or pad some of the margins on the left-hand side so it's not right on the border. Thank you again

    Posted 3 years ago on Monday April 9, 2012 | Permalink
  8. Also, can you tell me why it seems like the Phone Number and Email Address fields are outlined and have a white fill while the Name and Additional Comments don't seem to be outlined and seem to have a gray fill? Thanks!

    Posted 3 years ago on Monday April 9, 2012 | Permalink
  9. That's due to your theme:

    input[type="text"], input[type="password"], textarea {
    background: #FAFAFA;
    -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,0.1);
    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.1);
    box-shadow: inset 0 1px 1px rgba(0,0,0,0.1);
    border: 1px solid #DDD;
    color: #888;
    }

    It's only targeting inputs with the type of text and password. You can extend that to allow for the other input types if you wish. For example, the phone input is type="tel" and the email is type="email". So you can just adjust your theme's styles accordingly.

    As for the other piece, you should be able to add padding to the wrapper to provide some cushion.

    Posted 3 years ago on Monday April 9, 2012 | Permalink
  10. Your solution worked perfectly, however I am now doing another form and the State drop-down and another custom drop-down aren't affected by this. What input type (ex. "tel", "password") do I need to use to target those? Is there a list somewhere online with the input types? Thanks again for your help.

    See form here: http://iamsinc.com/blog/academyregistration/ (State and "Marketer" drop-down are white rather than gray)

    Posted 3 years ago on Wednesday April 18, 2012 | Permalink
  11. Drop Downs in HTML are referred to as a "select" element. So you can target it via:

    .gform_wrapper select {}

    Here is our documentation on our selectors and such:
    http://www.gravityhelp.com/documentation/page/Design_and_Layout

    For a general guide you could reference this page which has a bunch of stuff on it:
    http://www.gravityhelp.com/other-resources/

    Posted 3 years ago on Wednesday April 18, 2012 | Permalink
  12. Perfect! Thank you!
    And thanks for including those links.

    Posted 3 years ago on Wednesday April 18, 2012 | Permalink
  13. David Peralty
    Administrator

    Glad Rob was able to sort all that out for you.

    Posted 3 years ago on Wednesday April 18, 2012 | Permalink

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

Support Tickets

Open A New Support Ticket
 Open A New Priority Support Ticket *

* Developer license holders only