Constant Sum Choices: center on page, labels on top of boxes | XM Community
Question

Constant Sum Choices: center on page, labels on top of boxes

  • 9 September 2020
  • 1 reply
  • 68 views

Hello everyone,

I am using a Constant Sum Choices question to ask participants to divide a number of resources between two groups (see image below).
image.png
I would like for the two choice boxes to :
1) be centered on the page (as is the body of the question)
2) have the labels (Goldfish / Frogs) on top of the boxes rather than next to them (eventually, I'll substitute the labels with graphics, but I'm guessing their positioning would be the same?).

I'm guessing this requires some custom JS?
Thank you!


1 reply

Userlevel 7
Badge +27

Hi there, if you still need, this can be put in place by using a Matrix question that is set to Constant Sum and then applying some CSS.
Matrix_CS_styling.pngFirst, create a Matrix table question and set its type to Constant sum. Set the number of statements to 1 and the number of scale points to 2. Make the 1st scale point say "Goldfish" and the 2nd scale point read "Frog".
Then head over to the Style section of the survey's Look & Feel and add the below CSS:
.Skin .Matrix .CS td input {
    width: 60% !important;
}

.Skin .Matrix table th.c1, .Skin .Matrix table td.c1 {
    display: none;
}

Leave a Reply