I am trying to insert a back-ground image behind the ChoiceStructure for individual questions (so for some question answer options but not others). Is there a simple way to do this? I am not proficient in CSS or HTML but am happy to make small edits to suit.
I was able to do this behind ALL answer options using CSS as follows:
.ChoiceStructure {
background-image:url("URL");
background-repeat: no-repeat;
width: 100%;
height:100%;
background-position: center center;
text-align:center;
margin:auto;
padding:0;
}
Adding in a back-ground image for ChoiceStructure
Best answer by faris
helzpieOT Sounds like you want to use Javascript.
You can use the code below just be sure to swap out the URL value to the desired URL.
Qualtrics.SurveyEngine.addOnReady(function() {
var qid = this.questionId;
var url = 'INSERT_URL_HERE';
document.querySelector('#'+qid+' .ChoiceStructure').style.background = 'url("'+url+'") no-repeat center center';
document.querySelector('#'+qid+' .ChoiceStructure').style.width = '100%';
document.querySelector('#'+qid+' .ChoiceStructure').style.height = '100%';
document.querySelector('#'+qid+' .ChoiceStructure').style.margin = 'auto';
document.querySelector('#'+qid+' .ChoiceStructure').style.padding = '0';
});
If you don't know how to add JS to a question, see support page: https://www.qualtrics.com/support/survey-platform/survey-module/question-options/add-javascript/
Sign up
Already have an account? Login
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login to the Community
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
