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.

Trying to target specific input field?

  1. Hi guys, I've tried using the CSS samples in the help section, but I think I keep putting it in wrong.

    I have a forum where I'm trying to target one specific input field out of the rest of the customized fields on the form.

    The code for the form itself looks like this:

    body.custom .gform_wrapper .gform_body .gform_fields .gfield input[type=text],
    body.custom .gform_wrapper .gform_body .gform_fields .gfield input[type=email],
    body.custom .gform_wrapper .gform_body .gform_fields .gfield input[type=tel] {
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    border-radius: 8px;
    background-color: white;
    color: #333;
    border: 1px solid #CCC;
    font-size: 17px!important;
    box-shadow: inset 0px 0px 5px #e5e5e5;
    -moz-box-shadow: inset 0px 0px 5px #e5e5e5;
    -webkit-box-shadow: inset 0px 0px 5px #e5e5e5;
    word-spacing: 0.4pt;
    letter-spacing: 0.2pt;
    color: #000000;
    height: 40px;
    width: 100px;
    font-size: 17px!important;
    line-height: 25px;
    padding: 0 10px;
    }

    The CSS for the input field I'm trying to target (and in this case make the background red is below):

    <div class="ginput_container">
    <input name="input_16" id="input_1_16" type="text" value="" class="medium" tabindex="10"/>
    </div>

    Could someone share an example css of targeting this specific id in css within the string:
    body.custom .gform_wrapper .gform_body .gform_fields .gfield input[type=text]

    Posted 11 years ago on Sunday June 9, 2013 | Permalink
  2. Richard Vav
    Administrator

    There are a few ways of targeting that specific text input, you can follow the CSS Targeting Samples from the documentation which would give you

    body .gform_wrapper .gform_body .gform_fields #field_1_16.gfield input[type=text] {

    or you can just target the input id directly

    #input_1_16 {

    Regards,
    Richard

    Posted 11 years ago on Monday June 10, 2013 | Permalink
  3. You rock Richard, thank you so much! I saw the help documentation but it felt like I was reading latin for some reason (I'm not a great computer coder guy)

    Posted 11 years ago on Tuesday June 11, 2013 | Permalink
  4. Richard Vav
    Administrator

    Thanks and you're welcome.

    Posted 11 years ago on Tuesday June 11, 2013 | Permalink

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