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

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

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

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

 


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

 


@fzd999999 

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

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

 


@Deepak Thank you SO MUCH! It worked!


Leave a Reply