column widths | XM Community
Solved

column widths

  • 24 July 2018
  • 7 replies
  • 142 views

Hi, In a matrix table, is it possible to use CSS to change the column widths. In particular, to make the evenly spaced.
icon

Best answer by TomG 24 July 2018, 21:50

View original

7 replies

Userlevel 7
Badge +27
By default, answer column widths are the same. So, if they aren't then you probably have some columns labels that are wider than the common width that is causing them to automatically increase and others to decrease.

In order to change columns width you really need to use JavaScript because Qualtrics uses an attribute instead of a css style to set the width. Besides, it is a better to calculate the width in JavaScript rather than set it to some fixed value.
Tom G, how do you do that?
Userlevel 7
Badge +13
Hi @Lauren_BU! Be sure to use @ to tag and notify a user!
Userlevel 1
@tomG following this (how to set equal widths from css if labels are longer than scale points)?
Userlevel 7
Badge +27
@JanaJarecki - I'm not sure I understand what you are asking. Can you post a picture of your matrix?
Userlevel 1
Hi Tom,
thank you for the quick reply! =)

I'm asking how to implement your suggestion, i.e. what is the jQuery code to set the col width attributes in matrix tables
> By default, answer column widths are the same. So, if they aren't then you probably have some columns labels that are wider than the common width that is causing them to automatically increase and others to decrease.
> In order to change columns width you really need to use JavaScript because Qualtrics uses an attribute instead of a css style to set the width. Besides, it is a better to calculate the width in JavaScript rather than set it to some fixed value.

I can post a screenshot tomorrow when Im back in the office!
Userlevel 6
Badge +5
@JanaJarecki ,

Were you ever able to find the code for adjusting the column width? I could use it too!

Leave a Reply