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

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

  • Feb 17, 2022 5:43 PM UTC
  • 8 replies
  • 511 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';
}

View original

8 replies

vgayraud
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+68
  • QPN Level 8 ●●●●●●●●
  • Answer
  • Feb 17, 2022 6:19 PM UTC

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


Forum|alt.badge.img+6

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

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 8 ●●●●●●●●
Forum|alt.badge.img+68
  • QPN Level 8 ●●●●●●●●
  • Feb 17, 2022 7:05 PM UTC

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
  • Feb 18, 2022 11:45 AM UTC

vgayraud Thank you! It's working.


phbern
Level 2 ●●
Forum|alt.badge.img+8
  • Level 2 ●●
  • Feb 23, 2022 5:05 PM UTC

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

phbern yes, just do it for each required question.


phbern
Level 2 ●●
Forum|alt.badge.img+8
  • Level 2 ●●
  • Feb 23, 2022 5:21 PM UTC

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.