- Posts: 14
- Thank you received: 3
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Change Background Image for Each New Question
- workloopteam
- Topic Author
- Offline
- New Member
Less
More
5 years 5 months ago #175695
by workloopteam
Change Background Image for Each New Question was created by workloopteam
Hi Team,
I'm trying to use of background image so that it changes from question to question. Despite creating the question classes, there is no change between questions. Below are two (of many) unsuccessful attempts:
.question1 { background-image: url(/upload/surveys/xxxxx/images/free_crop.jpg);
background-repeat: no-repeat;
background-size: 100% 100%;}
.question2 { background-image: url(/upload/surveys/xxxxx/images/captured_crop.jpg);
background-repeat: no-repeat;
background-size: 100% 100%;}
Is there an error in my code or is it possibly due to the css ordering issue mentioned in the thread CSS Ordering ?
Thanks for your thoughts.
I'm trying to use of background image so that it changes from question to question. Despite creating the question classes, there is no change between questions. Below are two (of many) unsuccessful attempts:
.question1 { background-image: url(/upload/surveys/xxxxx/images/free_crop.jpg);
background-repeat: no-repeat;
background-size: 100% 100%;}
.question2 { background-image: url(/upload/surveys/xxxxx/images/captured_crop.jpg);
background-repeat: no-repeat;
background-size: 100% 100%;}
Is there an error in my code or is it possibly due to the css ordering issue mentioned in the thread CSS Ordering ?
Thanks for your thoughts.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
5 years 5 months ago #175710
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Change Background Image for Each New Question
did you trye with
background: …
background-image
?
background: …
background-image
?
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
5 years 5 months ago #175730
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Change Background Image for Each New Question
Can you activate a test survey and give a link here so we can see the source?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- workloopteam
- Topic Author
- Offline
- New Member
Less
More
- Posts: 14
- Thank you received: 3
5 years 5 months ago #175760
by workloopteam
Replied by workloopteam on topic Change Background Image for Each New Question
Hi Denis/ Tony.
Thanks for your time. Survey link is below:
workloop.limequery.com/414226?lang=en
Regards
Mark
Thanks for your time. Survey link is below:
workloop.limequery.com/414226?lang=en
Regards
Mark
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
5 years 5 months ago #175761
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Change Background Image for Each New Question
In your custom.css file, I see background image rules for the questions with classes ".question1" and ".question2".
The rule for "question3" is commented out.
There are no rules for any other question classes.
The rule for "question3" is commented out.
There are no rules for any other question classes.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- workloopteam
- Topic Author
- Offline
- New Member
Less
More
- Posts: 14
- Thank you received: 3
5 years 5 months ago #175817
by workloopteam
Replied by workloopteam on topic Change Background Image for Each New Question
I should be more precise - I'm trying to use the image to cover the entire background i.e. replace the default image. Included are various code combinations attempted from question 1 to 6.
Not sure what I'm missing.
.question6 {background-image: url(/upload/surveys/414226/images/pexels-photo-325185.jpeg);
background-attachment: fixed;
background-size: cover;}
Not sure what I'm missing.
.question6 {background-image: url(/upload/surveys/414226/images/pexels-photo-325185.jpeg);
background-attachment: fixed;
background-size: cover;}
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
5 years 5 months ago #175823
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Change Background Image for Each New Question
If you are trying to replace the image of the woman typing on a tablet, that cannot be done with question classes. That is a background image on the <body> element which is larger than the question elements and is higher in the DOM structure so cannot be manipulated with question classes.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- workloopteam
- Topic Author
- Offline
- New Member
Less
More
- Posts: 14
- Thank you received: 3
5 years 5 months ago #176011
by workloopteam
Replied by workloopteam on topic Change Background Image for Each New Question
Yes-was trying to replace the woman on the tablet. Will look at the body elements.
Many thanks.
Many thanks.
The topic has been locked.