Read Me: How to use the new Experience Community 💜
I used this code to change the question background color
jQuery("#"+this.questionId).css("background-color","#F5F5F5")
However, the color comes very close to the text. Is there a way to widen all the margins (top/bottom/left/right) so that there is more space between the text and the box?
Best answer by gPandey_715
Hello @Regan
You can add padding and margin to create more space around the text.
Try this updated code:Qualtrics.SurveyEngine.addOnload(function() { jQuery("#"+this.questionId).css({ "background-color": "#F5F5F5", "padding": "15px", "margin": "10px", "border-radius": "8px" });});
Thank you, that worked great! What would I have to add if I also want to have a border around the box?
You just need to add the border property to your CSS inside the .css method. Try the updated code with a border added:Qualtrics.SurveyEngine.addOnload(function() { jQuery("#"+this.questionId).css({ "background-color": "#F5F5F5", "padding": "15px", "margin": "10px", "border-radius": "8px", "border": "2px solid #000" });});
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.