Hello - I am building a form and some of the labels have text that wraps to the next line. I would like the text to be on one line while maintaining the alignment of the text boxes. Is there a way to add space to the label side of a text entry question so text doesn't wrap but also maintain the alignment of the text fields?
Thank you
Try using below code:
jQuery(".ControlContainer").css("width","0%");
rondev Thank you, I added the code and it worked however it did not move it over enough. Is there a way to move it further?
you can also surround the response option with
Here's examples of code you can use to prevent labels from wrapping to the next line:
Javascript:
Qualtrics.SurveyEngine.addOnload(function() {
var labels = document.querySelectorAll("label");
for (var i = 0; i < labels.length; i++) {
labelsi].style.whiteSpace = "nowrap";
}
});
CSS:
/* give the label more space to avoid warping to the next line*/
label {
padding-right: 100px;
}
Or:
.container {
display: flex;
align-items: center;
gap: 10px; /* Adds a 10-pixel gap between the label and text field */
}
label {
white-space: nowrap;
}
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.