changing picklist widths

  • 1
  • Question
  • Updated 6 years ago
The width of the textbox for a picklist differs between different picklists. It seems like the longest selectable value controls the width up to a maximum width. Is it possible to manually set this width so that longer texts can be displayed and also so that you can align picklists on both sides when they are in the same column?
Photo of Peter Baeza

Peter Baeza

  • 2,868 Points 2k badge 2x thumb

Posted 6 years ago

  • 1
Photo of Anna Wiersema

Anna Wiersema

  • 10,890 Points 10k badge 2x thumb
Hello Peter. Are you working in a table or a field editor? If you're in a table, you could around with adjusting the column % width for the picklists. This is a new feature :)



Is this helpful? What do you have in mind?
Photo of Peter Baeza

Peter Baeza

  • 2,868 Points 2k badge 2x thumb
Hi Anna,
Yes that's a great new feature but unfortunately I'm working in a field editor so it's not helping me here. Will probably need some custom css to fix this
Photo of Anna Wiersema

Anna Wiersema

  • 10,890 Points 10k badge 2x thumb
Ooh yeah. You can change the width of field editor columns, but I'm not sure about individual fields. I'll let you know if I find anything CSS-y and helpful.
Photo of John Nelson

John Nelson, Product Manager

  • 3,234 Points 3k badge 2x thumb
Peter, you're right. By default picklists are as wide as their longest value (or 100% whichever's smaller). You can do it by just setting the select element's width with css. This will make the select element the size you specify, but the drop down portion will still show the longer values.

So something like this should get the job done:

.nx-basicfieldeditor select { width: 125px; }