column widths | XM Community
Skip to main content
Solved

column widths


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

Best answer by TomG

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.
View original

7 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 5909 replies
  • Answer
  • July 24, 2018
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.

  • 3 replies
  • August 17, 2018
Tom G, how do you do that?

LaurenK
Former XM Community Team Member
Forum|alt.badge.img+13
  • Former XM Community Team Member
  • 900 replies
  • August 21, 2018
Hi @Lauren_BU! Be sure to use @ to tag and notify a user!

JanaJarecki
@tomG following this (how to set equal widths from css if labels are longer than scale points)?

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 5909 replies
  • September 28, 2018
@JanaJarecki - I'm not sure I understand what you are asking. Can you post a picture of your matrix?

JanaJarecki
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!

Forum|alt.badge.img+5
  • Level 3 ●●●
  • 204 replies
  • December 18, 2018
@JanaJarecki ,

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

Leave a Reply