Welcome to the LimeSurvey Community Forum

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

Colour

More
7 years 4 months ago #143484 by CFK
Colour was created by CFK
Dear all,

I need help!

Can you please help me an let me know how i can colour specific parts of a dual scale?




Thank you very much.

Version: Version 2.06+ Build 150911
Attachments:
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 4 months ago #143490 by tpartner
Replied by tpartner on topic Colour
Please do not double-post.

As pointed out in your other post, that would depend on the template.

Can you activate a test survey and give us a link?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
7 years 4 months ago #143491 by CFK
Replied by CFK on topic Colour
Thank you for your answer.

Of course - here is the link: Test
The topic has been locked.
  • ollehar
  • ollehar's Avatar
  • Offline
  • LimeSurvey GmbH Employee
  • LimeSurvey GmbH Employee
More
7 years 4 months ago #143492 by ollehar
Replied by ollehar on topic Colour
Hm, how come we don't have a CSS class for no answer cells?
The topic has been locked.
  • ollehar
  • ollehar's Avatar
  • Offline
  • LimeSurvey GmbH Employee
  • LimeSurvey GmbH Employee
More
7 years 4 months ago - 7 years 4 months ago #143493 by ollehar
Replied by ollehar on topic Colour
Is your survey multi-lingual? If no, you can hack some javascript in there to change the color.
Last edit: 7 years 4 months ago by ollehar.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 4 months ago - 7 years 4 months ago #143494 by tpartner
Replied by tpartner on topic Colour
Assuming you use the same answer codes, you can add something like this to the end of template.css (you will need to replace "41036" with your question ID ):

Code:
#question41036 .answer_cell_1_009,
#question41036 .answer_cell_2_0010 {
  Background-color: #DDDDDD !important;
}

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 7 years 4 months ago by tpartner.
The following user(s) said Thank You: CFK
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 4 months ago #143495 by tpartner
Replied by tpartner on topic Colour

Hm, how come we don't have a CSS class for no answer cells?

He inserted his own "No Answer" answers.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: CFK
The topic has been locked.
More
7 years 4 months ago #143499 by CFK
Replied by CFK on topic Colour
Again: Thank's for your quick answer.

Unfortunately it does not fit. :dry: :S






Maybe you can find my mistake. Thank you very much.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 4 months ago #143500 by tpartner
Replied by tpartner on topic Colour
Looks fine to me. Did you completely clear your cache before testing?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: CFK
The topic has been locked.
More
7 years 4 months ago - 7 years 4 months ago #143501 by CFK
Replied by CFK on topic Colour
It worked. Great. Thank YOU :)






So, I have do to this for every single question separate?
Attachments:
Last edit: 7 years 4 months ago by CFK.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 4 months ago #143502 by tpartner
Replied by tpartner on topic Colour
Yes, unless you give those N/A answers a unique answer code like "ka". Then you should be able to target them all with something like:

Code:
.answer_cell_00ka,
.answer_cell_1_00ka,
.answer_cell_2_00ka {
  Background-color: #DDDDDD !important;
}

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
7 years 4 months ago - 7 years 4 months ago #143503 by CFK
Replied by CFK on topic Colour
Thank you again for your kind and quick reply.

I will try this.

And if I want to colour only the second matrix and not a specific part of the matrix: which "Code" I have to write in the "template.css" for this?





Thank you in advance! Great support!
Attachments:
Last edit: 7 years 4 months ago by CFK.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose