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.

Styling Dropdown

  1. Hi Dear,

    i've just finished a deep search in the support forum but i didn't found a complete post in order to make customization of the dropdown menu. I had a look of the css reference but nothing.

    I'd like to apply a background image to the drop down options filed and after that make some changes in the layout of the select menu.

    Could you give me some tips regarding this issue?

    Many thanks!

    P.

    Posted 13 years ago on Friday June 10, 2011 | Permalink
  2. That's in the documentation under the heading "Drop-Down (Select) Field"

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

    [css]
    body .gform_wrapper .gform_body .gform_fields .gfield select {border:1px solid red}

    if you wanted to apply the rule to one specific select element (drop down field) then you would view the source, note the unique ID and target it like this. Just change the "input_1_1" to your actual ID.

    [css]
    body .gform_wrapper .gform_body .gform_fields .gfield select#input_1_1 {border:1px solid red}
    Posted 13 years ago on Friday June 10, 2011 | Permalink
  3. Hi kevin,

    thanks for your explanation!

    One more thing: is there the possibility to delete (or override) the default (i suppose of the browser) trigger icons of the select fields for example adding a particular image?

    Sorry for my bad english but i'm italian!

    I hope to point out which is the meaning of my question.

    Thanks,

    P.

    Posted 13 years ago on Friday June 10, 2011 | Permalink
  4. You would have to use jQuery/CSS to essentially replace the default select form control. Something like this.

    tutorial: http://www.jankoatwarpspeed.com/post/2009/07/28/reinventing-drop-down-with-css-jquery.aspx

    demo: http://www.jankoatwarpspeed.com/examples/reinventing-drop-down/Select2DropDown.html

    There are several other similar methods you could explore, some are easier than others. You just have to find the one that works best for you.

    Google: http://j.mp/iJvKJ7

    Posted 13 years ago on Friday June 10, 2011 | Permalink