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

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

  • Feb 17, 2021 10:53 AM UTC
  • 3 replies
  • 186 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 ●●●●●●●
  • Feb 17, 2021 11:30 AM UTC

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 ●●●●●●
  • Answer
  • Feb 17, 2021 11:39 AM UTC

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


  • Author
  • Feb 17, 2021 12:43 PM UTC

Thanks a lot