How can I add an asterisk to the end of a question using CSS? | XM Community
Skip to main content
Solved

How can I add an asterisk to the end of a question using CSS?

  • February 17, 2022
  • 8 replies
  • 441 views

Forum|alt.badge.img+6

Is there a way I can add an asterisk (*) to any question using CSS? I need it in CSS so I can just place the code in the Custom CSS editor in the Look and Feel.

Best answer by vgayraud

.Skin .QuestionText:after {
 content: '\\002A';
}

8 replies

vgayraud
QPN Level 6 ●●●●●●
Forum|alt.badge.img+58
  • QPN Level 6 ●●●●●●
  • Answer
  • February 17, 2022

.Skin .QuestionText:after {
 content: '\\002A';
}


Forum|alt.badge.img+6
  • Author
  • February 17, 2022

vgayraud Thank you for the help. May I know if it is also possible for a Star Rating Question as shown below?
image.png


Forum|alt.badge.img+6
  • Author
  • February 17, 2022

https://community.qualtrics.com/XMcommunity/discussion/comment/43791#Comment_43791Is it also possible for a Star Rating Question as shown below?
image.png


vgayraud
QPN Level 6 ●●●●●●
Forum|alt.badge.img+58
  • QPN Level 6 ●●●●●●
  • February 17, 2022

reoolivarez
In that case, it would probably something like :
.Skin .STAR .Stars th.ylabel:after {
 content: '\\002A';
}
Inspect your survey preview using your browser dev tools to identify the specific element you want to change, just be careful not to add your css to high-level classes (for example applying your css to all ylabel classes) or you might get unintended asterisks everywhere in your survey.


Forum|alt.badge.img+6
  • Author
  • February 18, 2022

vgayraud Thank you! It's working.


phbern
Level 2 ●●
Forum|alt.badge.img+8
  • Level 2 ●●
  • February 23, 2022

If I can hijack this thread for a moment: Is there a way to do this, say, only for required (forced response) questions?


Forum|alt.badge.img+6
  • Author
  • February 23, 2022

phbern yes, just do it for each required question.


phbern
Level 2 ●●
Forum|alt.badge.img+8
  • Level 2 ●●
  • February 23, 2022

I wasn't clear :-)

I'd like to do it in the Look and Feel CSS so it is done automatically for each required question. I'd like to be able to add this to the sitewide themes so users don't have to mess with entering/editing the CSS themselves.