Spacing between questions | XM Community
Skip to main content
Does anybody know of a way to adjust the spacing between questions in a block? Not the entire survey, but just for one of the blocks in the survey!

Thanks,
Hello @jparkteach ,



To remove the bottom space of particular question then paste below code on the js(OnReady) of that question:



`jQuery("#"+this.questionId).css("padding-bottom","0px"); `



To remove the spacing between all the questions of a page then paste below code in the first question (which will be definitely be displayed to all respondent) js part



jQuery(".QuestionOuter").css("padding-bottom","0px");
Hi Shashi,

Thank you for your reply. But it's not working and I'm not sure what I'm doing wrong.

JOHN
I'm having the same issue. Tried this, also not working.

In case someone is still facing the problem:
The code above works perfectly. You have to post it in the Javascript of your question. Depending on how much space you want to add, the "24px" has to be increased / decreased:
jQuery("#"+this.questionId).css("padding-bottom","24px");


I tried all of the above but it did not work. After checking the API this is what worked for me. I wanted to remove both the top and the bottom padding. I added this in the java script tap of the comments question.
Qualtrics.SurveyEngine.addOnload(function()
{
   jQuery(this.getQuestionTextContainer ()).css("padding-top","0px");

   jQuery(this.getQuestionTextContainer ()).css("padding-bottom","0px");
});
qs.JPGqi.JPG



Leave a Reply