Spacing between questions | XM Community
Solved

Spacing between questions

  • 24 April 2019
  • 5 replies
  • 505 views

Badge
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,
icon

Best answer by Nazayer 3 September 2021, 07:42

View original

5 replies

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");
Badge
Hi Shashi,
Thank you for your reply. But it's not working and I'm not sure what I'm doing wrong.
JOHN
Badge +1
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