How can I apply colour to alternate rows within a matrix table? | XM Community
Solved

How can I apply colour to alternate rows within a matrix table?

  • 21 May 2019
  • 9 replies
  • 888 views

Badge +2
Hi everyone,

Does anyone know the code for applying colour to alternate rows within a matrix table? It seems that the new look & feel menu does not allow anymore to make this change through the available options to select.

Many thanks,

Best,

Patrizia
icon

Best answer by jainshubham 21 May 2019, 17:02

View original

9 replies

I would also be interested in knowing the answer to this question.

Thank you.

Philipp
Userlevel 3
Badge +3
Hi @Pat87

You would need to add the below code under Look&Feel>Style>Custom CSS.

tr.ChoiceRow{
background-color:#F0F0F0;
}
tr.ChoiceRow.ReadableAlt{
background-color:white;
}

Here's the result you will achieve with this code:

!
Cool. That worked.

Thank you.

Philipp
Badge +2
It worked! Many thanks.
Patrizia
Userlevel 3
Badge +10

jainshubham thank you very much, it worked for the matrix table!
I would like to do the same for a "side by side" type of question but I couldn't. Any idea? I would appreciate it, thanks in advance.

Hi,
How do I apply this style to text entery questions as well?
When i use The Form option.

Userlevel 7
Badge +21

https://www.qualtrics.com/community/discussion/comment/34625#Comment_34625Could you please ask a new question. It will help others to find the answer later.

Userlevel 1
Badge +2

It worked!!!

Thank you very much!

Badge +2

Hi. I use the coding above for alternate row shading in matrix, and it worked when I hover my mouse over a row, but when I don’t hover, the entire matrix is white, there is no shading. Here is the code I used and the screenshot.

tr.ChoiceRow{
background-color:#DCD5E5;
}
tr.ChoiceRow.ReadableAlt{
background-color:white;
}
 

With no hover:

 

With hover:

 

Leave a Reply