How can I add a different color to each answer choice for a multiple choice question? | XM Community
Skip to main content
Question

How can I add a different color to each answer choice for a multiple choice question?

  • November 1, 2021
  • 1 reply
  • 264 views

Forum|alt.badge.img+1

I was able to do this with the following code, but unsure how to give each square it's unique color. Any thoughts?
.Skin #QID8 label.SingleAnswer, .Skin #QID8 label.SingleAnswer
{ background:#A8E83D;
border-color: #A8E83D;
border-width:2px;
color: #ffffff;
font-weight: Bold;

image.png

1 reply

JeremyK
Level 3 ●●●
Forum|alt.badge.img+7
  • Level 3 ●●●
  • November 2, 2021

CSS is generally used for globally setting styles in a survey, not just for a single question; that's where JavaScript comes in. If you do want to have all your multiple choices in the survey have a different background color, check out this post:
image.pngSource: https://css-tricks.com/forums/topic/multiple-same-div-class-different-color-borders/