How to change the background color of the first coloum in Multiple Choice question? | XM Community
Question

How to change the background color of the first coloum in Multiple Choice question?


I have 3 x 3 Multiple Choice question. I want to change the background color of the first colomn in this matrix. How can I do it? And I am also wondering how I can change the setting of just a few choices in specific positions. But I don't know where I can get to know the id of the choices in the Multiple Choice matrix I set?
Thanks a lot.

5 replies

Userlevel 3
Badge +3
Hi @cqulihui,

This is possible at the column level.

You would need to know the column id of the 3 x 3 table.

If you want to accomplish something as shown in the screenshot attached, you can enter the code under Look and Feel>Style>Custom CSS.

To mention, this code is not specific to a particular matrix question. The below settings would apply to all matrix questions.

td.c4 {
background-color:#90EE90;
}
td.c5{
background-color:yellow;
}
td.c6{
background-color:#FA8072;
}
label.q-radio.q-checked{
background-color:black !important;
}

!
Thanks very much for your help! @jainshubham
If I get it right, after I add this code into Look&Feel-->Style, the background color of all the tables will be changed.
I just want to change one Multiple Choice question. How can I do this? And I have been looking for the column id. I failed to find it. Where can I find the ids?
Thanks a lot!
> I just want to change one Multiple Choice question. How can I do this? And I have been looking for the column id. I failed to find it. Where can I find the ids?
> Thanks a lot!

Paste the following code in the js(OnReady) of the matrix question

jQuery("#"+this.questionId+" td.c4").css("background","grey");
Hi @Shashi,
Thanks for your help. I have tried your code. But it doesn't work. I use a Multiple Choice question, not a matrix question. I am not sure whether the question type is the reason that the code doesn't work.
Thanks again.
Userlevel 3
Badge +3
Hi @cqulihui,

Maybe the below discussion could be of some help to you:

https://www.qualtrics.com/community/discussion/comment/14275#Comment_14275

Leave a Reply