Adding border to a single question on Qualtrics survey | XM Community
Skip to main content
Solved

Adding border to a single question on Qualtrics survey

  • October 30, 2023
  • 4 replies
  • 552 views

Forum|alt.badge.img+1

I am trying to add a black border to a single question on Qualtrics Survey. I tried to add the following code to HTML view option on the question editor dialog, but did not work,

<style>
div.Inner.BorderColor {border: solid #ededed;}
</style>

 

I also tried div#QID223.QuestionOuter.BorderColor.MC.QID223 and jQuery(.class).css('border','1px') but did not work. QID223 is the question I want to add the border to. 

 

Can someone help me with this? Thank you very much in advance

Best answer by Deepak

@fzd999999 

I believe you are using Simple Layout, try the below code

document.querySelector('.question').style.border = "2px solid black";

 

4 replies

Shashi
Level 8 ●●●●●●●●
Forum|alt.badge.img+34
  • Level 8 ●●●●●●●●
  • 654 replies
  • October 31, 2023

Use below code in the OnReady JS function of the question:

jQuery("#"+this.questionId).css("border","2px solid black");

 


Forum|alt.badge.img+1
  • Author
  • 3 replies
  • October 31, 2023

Hi,

 

Thank you for your help! Do you mean like this? I tried, but did not work, so I want to double check.

Javascript screenshot

 


Deepak
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+46
  • 1555 replies
  • Answer
  • October 31, 2023

@fzd999999 

I believe you are using Simple Layout, try the below code

document.querySelector('.question').style.border = "2px solid black";

 


Forum|alt.badge.img+1
  • Author
  • 3 replies
  • October 31, 2023

@Deepak Thank you SO MUCH! It worked!