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

How can I center drop down questions?

  • Aug 20, 2020 12:09 PM UTC
  • 7 replies
  • 235 views

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 ●●●●●●
  • Aug 20, 2020 12:32 PM UTC

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


  • Author
  • Aug 20, 2020 12:37 PM UTC

sadly it doesn't work, but thanks anyway :)


rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • Aug 20, 2020 12:44 PM UTC

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


  • Author
  • Aug 20, 2020 12:47 PM UTC

sure I pasted in javascript:
image.png


rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • Answer
  • Aug 20, 2020 1:29 PM UTC

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


  • Author
  • Aug 20, 2020 2:17 PM UTC

than you, works perfectly! :)


Martin_O
Level 2 ●●
Forum|alt.badge.img+11
  • Level 2 ●●
  • Jan 7, 2022 11:13 PM UTC

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.