How to evenly space matrix columns | XM Community
Solved

How to evenly space matrix columns

  • 11 May 2020
  • 3 replies
  • 316 views

Userlevel 6
Badge +5

Or set a minimum column width. Can this be done easily? I have larger labels on the ends of the matrix and I don't like how they are impacting the spacing of the columns.

icon

Best answer by TomG 11 May 2020, 19:43

View original

3 replies

Userlevel 7
Badge +27

Matrix columns are automatically sized to be the same size, but when the text in the column headers is too large the column sizes automatically expand to fit the content. Possible fixes:

  1. Use labels for the scale end point text because they will span across columns.

  2. Reduce the width of the first column leaving more room for the other columns

  3. Check "Position text above" to allow more room for the columns

  4. Allow the long words in your text to break on syllables using the ­ entity

  5. Reduce the padding of your column header cells

  6. Reduce the font size of you column header text

  7. Rotate your column header text

Userlevel 6
Badge +5

TomG Thanks for your help. Unfortunately labels aren't an option since they don't show up on mobile. I think reducing the padding may work for me. Would you be willing to share the JS for how to reduce the matrix column header padding?

Userlevel 7
Badge +27

Using something like:
jQuery("#"+this.questionId+" .Answers th").css("padding","10px 2px");
Where 2px is the left/right padding.

Leave a Reply