Aligning text boxes within a side-by-side question | XM Community
Skip to main content

Hi,

I've got a side-by-side question and due to the text I've added after the fields, it looks like this.
image.pngI've tried multiple JS/CSS ways of aligning these fields to the left, or centering them properly, but I'm having no luck.
Does anyone know how i might go about solving this?

Try the below code if the text entry column is your second column in SBS question, else find the class name of its "td" tag and add below css
jQuery("#"+this.questionId+" td.c7").css("text-align","left");


Worked like a charm, thanks so much!


rondev or anyone - Could you share how to modify my code to get the static text to the right of the text boxes to be different on different rows of an SbS matrix like in the example above?
I am using this code on the entire column but I need to change the units on a few rows. Thanks!
var inputs = $(this.getQuestionContainer()).select('input[type="number"]');
for (var i = 0; i < inputs.length; i++) {
 var input = inputssi];
 $(input).insert({after: ' pounds'});


Leave a Reply