Welcome to the LimeSurvey Community Forum

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

Change background color on selected answer

  • aukevann
  • aukevann's Avatar Topic Author
  • Away
  • Senior Member
  • Senior Member
More
4 years 2 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.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 2 months ago - 4 years 2 months ago #193416 by Joffm
Replied by Joffm on topic Change background color on selected answer
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: 4 years 2 months ago by Joffm.
The topic has been locked.
  • aukevann
  • aukevann's Avatar Topic Author
  • Away
  • Senior Member
  • Senior Member
More
4 years 2 months ago #193418 by aukevann
Replied by aukevann on topic Change background color on selected answer
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.
  • aukevann
  • aukevann's Avatar Topic Author
  • Away
  • Senior Member
  • Senior Member
More
4 years 2 months ago #193419 by aukevann
Replied by aukevann on topic Change background color on selected answer
Sorry, just saw that there are more display options so figured out the size issue
The topic has been locked.
More
3 years 5 months ago #207338 by joeliu916
Replied by joeliu916 on topic Change background color on selected answer
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.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 5 months ago #207341 by holch
Replied by holch on topic Change background color on selected answer
Please do not post in different threads. You have asked this already in an own thread.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: DenisChenu, joeliu916
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose