How can I center drop down questions? | XM Community
Skip to main content
Solved

How can I center drop down questions?


Is there a way to center scuh drop down questions so they show up in the middle of the page instead of left?
image.png

Best answer by rondev

Just click on the clear button of the Add javascript pop up and paste it as below:
image.png

View original

7 replies

rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • 1448 replies
  • August 20, 2020

Use the below code:
jQuery("#"+this.questionId+" .QuestionBody").css("text-align","center");


  • Author
  • 3 replies
  • August 20, 2020

sadly it doesn't work, but thanks anyway 🙂


rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • 1448 replies
  • August 20, 2020

image.pngCan you show where you have pasted the code.


  • Author
  • 3 replies
  • August 20, 2020

sure I pasted in javascript:
image.png


rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • 1448 replies
  • Answer
  • August 20, 2020

Just click on the clear button of the Add javascript pop up and paste it as below:
image.png


  • Author
  • 3 replies
  • August 20, 2020

than you, works perfectly! 🙂


Martin_O
Level 2 ●●
Forum|alt.badge.img+11
  • Level 2 ●●
  • 65 replies
  • January 7, 2022

rondev How would I change the javascript to center a form field question? The code above worked for me when doing a drop-down but didn't work for a form-field text entry question.


Leave a Reply