Does anyone know how to center text-entry boxes? | XM Community
Skip to main content
Is there a way to make the text-entry boxes appear in the center of the screen rather than the left side?
Assuming you are using a Text entry style question, add the following to the html of the question:

<style>
.ChoiceStructure {
text-align: center;
}
</style>

If you have multiple questions on the page and you only want to center this one, try adding the following Javascript to the Question:

Qualtrics.SurveyEngine.addOnReady(function()
{
this.questionContainer.select('.ChoiceStructure')[0].style = 'text-align: center;';
});
@AnthonyR The html worked perfectly! Thank you!
@AnthonyR - thanks for posting! All sorts of useful snippets for us Qubies 0_o

@AnthonyR , ​@LibertyW can either of you show me exactly where I should place this? I’ve tried placing it between the brown //, I’ve removed everything and added in “<style> .ChoiceStructure { text-align: center; } </style>,” I’ve tried only adding it on one of the lines… The above screenshot is what pulls up when I open up JS on the question


Leave a Reply


OSZAR »