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.

Drop Down - enhanced user interface CSS

  1. TimmyD
    Member

    While it seems possible to target the drop down element and field with something like the below this doesn't seem to have any effect when trying to target a drop down that's had the enhanced user interface switched on.

    Is there some other CSS required?

    body #gform_wrapper_X .gform_body .gform_fields .gfield select {margin-left: 10px; border:1px solid red}

    Many Thanks

    Posted 11 years ago on Thursday August 16, 2012 | Permalink
  2. The enhanced drop down does have some extra markup/classes because it uses JS to do some code replacement. Do you have a link to your form?

    Posted 11 years ago on Thursday August 16, 2012 | Permalink
  3. TimmyD
    Member

    Sure thanks Rob, in development here; http://www.sourcecapital.co.uk

    I'm just trying to align that third question's dropdown with the field name as per the one above it. There's multiple instances of them as you hit page two of form.

    Many Thanks

    Posted 11 years ago on Thursday August 16, 2012 | Permalink
  4. Cool, this should do the trick for you:

    [css]
    body .gform_wrapper .chzn-container {
    margin-left: 15px;
    }
    Posted 11 years ago on Thursday August 16, 2012 | Permalink
  5. TimmyD
    Member

    You're a star, that's done the job. Many thanks indeed.

    Posted 11 years ago on Thursday August 16, 2012 | Permalink
  6. No problem, glad to help. Looks like I missed another, drop this in for the actual items in the drop down:

    [css]
    body .gform_wrapper .chzn-container-single .chzn-drop {
    margin-left: 15px;
    }

    :)

    Posted 11 years ago on Thursday August 16, 2012 | Permalink
  7. TimmyD
    Member

    Gentleman, thank you.

    Posted 11 years ago on Thursday August 16, 2012 | Permalink
  8. TimmyD
    Member

    Actually is there a list of these elements anywhere, I couldn't find any before and just need to move the background and bits to the left as well. Thank you again.

    Posted 11 years ago on Thursday August 16, 2012 | Permalink
  9. Your best bet would probably be to use Chrome Developer Tools or Firebug for Firefox to inspect.

    Posted 11 years ago on Thursday August 16, 2012 | Permalink
  10. David Peralty

    Here is our page regarding CSS Targeting:
    http://www.gravityhelp.com/documentation/page/CSS_Targeting_Samples

    Posted 11 years ago on Thursday August 16, 2012 | Permalink
  11. TimmyD
    Member

    Thanks guys, everything on target just bar that search box once the drop down has been clicked - just no idea how to align? Any ideas, is it part of another element. Thank you in advance., Tim

    Posted 11 years ago on Thursday August 16, 2012 | Permalink
  12. Looks like this here is the cause for that: Screenshot

    Try dropping this in to see if it overrides it:

    [css]
    body .gform_wrapper .chzn-container-single .chzn-search input {
    margin-left: 0 !important;
    }
    Posted 11 years ago on Thursday August 16, 2012 | Permalink
  13. TimmyD
    Member

    No such luck I'm afraid

    Posted 11 years ago on Thursday August 16, 2012 | Permalink
  14. I don't see that style in your stylesheet - can you drop it in so I can see what's happening with it?

    Posted 11 years ago on Thursday August 16, 2012 | Permalink
  15. TimmyD
    Member

    errr, sorry! my bad...thought I had put it in but I hadn't. All working. Huge thanks for your patience. Tim

    Posted 11 years ago on Thursday August 16, 2012 | Permalink
  16. Nice, no worries. Glad you are all set!

    Posted 11 years ago on Thursday August 16, 2012 | Permalink

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