How to set/control the width of individual columns in a single side by side question | XM Community
Skip to main content
Hello,



I have a Side-By-Side question that has 2 statements and 3 columns. I would like to control width of the 3 columns independently. The statement column should be 400px, column 1=65px, column 2=65px, and column 3=40px. Column 1 and column 2 are dropdown list and column 3 is a single choice.

I am change the with of the statement column and column 3 in the survey editor. I am not able to compress the width of column 2 or 3 column which too wide. I basically want to reduce the white space on the hours and minutes columns

Can this be accomplished with javascript at the question level?



!









Thanks in advance

Jed
You can adjust the size of all the columns by dragging the column divider to the right of the column. You just can't see the result until you preview the question. So, to minimize the size of the hour and minutes columns, drag the divider to the right left until you reach the divider for the previous column. For the label column drag its divider to the right to increase the size.



After you've resized them by dragging, there will be a div with a class of WidthStrut under the tr with the class Headings for each column (th.c1, th.SBS1, th.SBS2, th.SBS3). You can use JavaScript to fine tune the widths if necessary.
Thanks! Worked perfectly. Never knew that the middle columns didn't refresh.
Hi there!



I am working on the same problem and hoping you can share the javascript you used to change the column widths.



Thanks in advance,

Steph
@TomG or @Jed, I am having the same issue. Can you share the javascript you use to change the column widths?
@TomG

I'm also wondering how to read out those divs/WithStruts... how do I gain access to them?
> @cpschroeder said:

> @TomG

> I'm also wondering how to read out those divs/WithStruts... how do I gain access to them?



Use your browser's inspect feature.
> @TomG said:

> > @cpschroeder said:

> > @TomG

> > I'm also wondering how to read out those divs/WithStruts... how do I gain access to them?

>

> Use your browser's inspect feature.



Could've thought of that... thanks! 😀

Leave a Reply