3

We have a custom field that has a number of options. The descriptions of a few of them are long and wrap funny in the pull down, which, sigh, apparently is confusing to some people. Is there an easy change the width of this pull down?

4
  • Is it a Select2 list? Commented Feb 24, 2016 at 17:59
  • It is a Select2 list
    – Paul-Tahoe
    Commented Feb 24, 2016 at 18:36
  • Perhaps this discussion of widening Select2 elements might help: civicrm.stackexchange.com/questions/7259/setting-select2-widths Commented Feb 24, 2016 at 19:00
  • 1
    I suspect it might. But, at least for me, dealing with style sheets is not easy, so I think the answer is no, there isn't an easy way. In the meantime, I convinced the user to shorten descriptions.
    – Paul-Tahoe
    Commented Feb 24, 2016 at 22:27

1 Answer 1

2

Well, I ended up needing to figure this out. So in a file mysite.css I put this:

#select2-drop {width: 350px !important;}

Then in Administer => System Settings => Resource URL, I put the path and file name the file in the Custom css URL. (All the other places to put URLs on the page want just a directory. Custom css URL also needs the file name.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.