Welcome to the LimeSurvey Community Forum

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

Color answer label alternating per row

  • markheckmann
  • markheckmann's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 7 months ago - 2 years 7 months ago #225555 by markheckmann
Color answer label alternating per row was created by markheckmann
Dear all,
in a series of matrix questions, I want to alternate the color of the answer labels per between green and red (i.e. the 1st answer label should be green, the 2nd red, etc.) as indicated in the attached image. I have not been succesfull coming up with the correct CSS. Does someone know how to do that?
Thanks! :)
Mark 


Please help us help you and fill where relevant:
Your LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen]
Own server or LimeSurvey hosting:
Survey theme/template:
==================
(Write here your question/remark)
Last edit: 2 years 7 months ago by markheckmann.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 7 months ago #225562 by Joffm
Replied by Joffm on topic Color answer label alternating per row
1. 
Code:
<span style="color:green">IST</span>
<span style="color:red">SOLL</span>
 

2.
Code:
<span style="background-color:green;color:white;padding:5px;border:2px solid darkgreen">IST</span>
<span style="background-color:red;color:white;padding:5px;border:2px solid darkred">IST</span>
 

3.
Code:
<div style="width:100%;background-color:green;color:white;padding:5px;border:2px solid darkgreen">IST</div>
<div style="width:100%;background-color:red;color:white;padding:5px;border:2px solid darkred">IST</div>



 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 7 months ago #225563 by Joffm
Replied by Joffm on topic Color answer label alternating per row
Okay, clicked "Submit too early and the editor doesn't let me edit.

These are some rough ideas.
Of course you can create classes for even and odd rows.
But I think this is only used a few times in some questions.

And with a "text-align:left" added you get this.
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
2 years 7 months ago #225567 by DenisChenu
Replied by DenisChenu on topic Color answer label alternating per row
I don't trye to edit too ;)

Same for you ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 7 months ago #225569 by Joffm
Replied by Joffm on topic Color answer label alternating per row
Yes, mainly when there are images inserted.
Tony reported  it some time ago, I think

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose