Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Change background color on selected answer

More
5 years 7 months ago #193412 by aukevann
Hi,

I have a radio-list question, with pictures rather than text as answer options. When the user selects an answer I like to change the background color of the selected answer/picture or but a border around it. Can this easily be done by adjustin the template and if so can someone point me to where?

Kind regards,
Auke
The topic has been locked.
More
5 years 7 months ago - 5 years 7 months ago #193416 by Joffm
Hi, Auke,
this is a built-in behaviour if you use the question theme "image-select"



You may change the border color

li.imageselect-listitem .imageselect-container input.imageselect-checkbox:checked + label {
border: 18px solid
hsla(20,100%,30%,0.9);
}


Joffm

P.S.
Remember to enter only the path of the picture into the answer option, without "<img src."...
www.example.de/myFolder/myPicture.jpg

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 5 years 7 months ago by Joffm.
The topic has been locked.
More
5 years 7 months ago #193418 by aukevann
Hi Joffm,

Thanks, this is great. I could not find how to get this option working.

Can you also tell me what labels to use to:
Change the size of the image
Change the background color of the checked item (using a png file).

Cheers,
Auke
The topic has been locked.
More
5 years 7 months ago #193419 by aukevann
Sorry, just saw that there are more display options so figured out the size issue
The topic has been locked.
More
4 years 10 months ago #207338 by joeliu916
Hi Joffm,

I see that you mentioned enter image path without <img src....>
But what if that picture is not taken online and I do not have a url link to the picture? I'm using the upload function in the survey.. and the picture that i uploaded is not showing in the answers. Please help....


Joe
The topic has been locked.
More
4 years 10 months ago #207341 by holch
Please do not post in different threads. You have asked this already in an own thread.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The following user(s) said Thank You: DenisChenu, joeliu916
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose