Trying to add separators between certain questions within my survey | XM Community
Skip to main content

Hello,
I currently have a 3 question survey and an end of survey message at the end.
I would like there to be separators between Q1, Q2, and Q3.
Using the following code:
.Skin .Separator {
  height: 2px;
  background: gainsboro;
  display:block!important;
  }
It adds the separators I want (between Q1, Q2, and Q3), however it also adds a separator above Q1. I do not want there to be a separator above Q1.

I was able to find a workaround using the following code:
#Questions > div:first-child{display:none!important;}
It removes the separator above Q1, however it also removes the End of Survey message that appears on the next page once the recipient completes the survey.

If anyone knows how I can achieve only having separators between Q1, Q2, and Q3 while also not impacting the End of Survey message it would be greatly appreciated.

My initial thoughts were:
Trying to find CSS to only apply a separator above Q2 and Q3
OR
Trying to only apply the CSS to page 1 of the survey
...but I cannot seem to find the right CSS or JS to do this.

Any guidance is appreciated!

Best,
Regatron


Hi regatron ,

"however it also adds a separator above Q1. I do not want there to be a separator above Q1."

It sounds like you might have a hidden question at the start (eg: meta info).
Without having to find the specific elements to apply the CSS to, does the following work for you?
#Questions > div:not(:first-child) {
  height: 2px;
  background: gainsboro;
  display: block !important;
}
That should apply separators to any questions not first in line.
Good luck!


Leave a Reply