How can I apply colour to alternate rows within a text entery Form questions? | XM Community
Skip to main content
Solved

How can I apply colour to alternate rows within a text entery Form questions?

  • February 17, 2021
  • 3 replies
  • 130 views

I found this formula here:
tr.ChoiceRow{
background-color:#F0F0F0;
}
tr.ChoiceRow.ReadableAlt{
background-color:white;
}
Which Is good for Matrix Table type. I want to do the same style for other types of questions like text entery, side by side etc.

Best answer by rondev

For text entry question (use in html view of question):

View original

3 replies

Forum|alt.badge.img+22
  • Level 7 ●●●●●●●
  • 2028 replies
  • February 17, 2021

tr{
background-color:#F0F0F0;
}
tr.ReadableAlt{
background-color:white;
}
The problem with the form rows is that the background extends till the end, i.e. beyond the input field also.
To limit it, you can td to each of these elements.
tr td:not(.ControlContainer){
background-color:#F0F0F0;
}
tr.ReadableAlt td:not(.ControlContainer){
background-color:white;
}
This will limit the background change to the text.


rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • 1449 replies
  • Answer
  • February 17, 2021

For text entry question (use in html view of question):


  • Author
  • 6 replies
  • February 17, 2021

Thanks a lot


Leave a Reply