- Posts: 6
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
I want to make the colors of Yes and No different colors
- toraco
- Topic Author
- Offline
- New Member
Less
More
6 years 2 weeks ago #167183
by toraco
I want to make the colors of Yes and No different colors was created by toraco
Hello! All!
I am using LimeSurvey version 2.65.6.
I want to make the colors of Yes and No different colors, but I do not know the method.
I searched the template editor and template js,
Please tell me a good plan.
As an example
<! - Yes -> <label class = "btn btn - primary>
<! - No -> <label class = "btn btn-default> etc ..
Thank you!
I am using LimeSurvey version 2.65.6.
I want to make the colors of Yes and No different colors, but I do not know the method.
I searched the template editor and template js,
Please tell me a good plan.
As an example
<! - Yes -> <label class = "btn btn - primary>
<! - No -> <label class = "btn btn-default> etc ..
Thank you!
The topic has been locked.
- LouisGac
- Visitor
6 years 2 weeks ago #167185
by LouisGac
Replied by LouisGac on topic I want to make the colors of Yes and No different colors
The HTML of the questions is not inside survey themes.
Since LS3, we have a Question Theming functionality:
github.com/LimeSurvey/LimeSurvey/tree/master/themes/question
In LS 2.50+, we have question view override:
manual.limesurvey.org/Theme_editor#Custo...ws_.28New_in_3.0_.29
Since LS3, we have a Question Theming functionality:
github.com/LimeSurvey/LimeSurvey/tree/master/themes/question
In LS 2.50+, we have question view override:
manual.limesurvey.org/Theme_editor#Custo...ws_.28New_in_3.0_.29
The topic has been locked.
- Joffm
- Away
- LimeSurvey Community Team
Less
More
- Posts: 12937
- Thank you received: 3979
6 years 2 weeks ago #167186
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic I want to make the colors of Yes and No different colors
Hi, toraco,
unfortunately you did not search the forum
www.limesurvey.org/forum/installation-a-...or-a-yes-no-question
Best regards
Joffm
I searched the template editor and template js,
unfortunately you did not search the forum
www.limesurvey.org/forum/installation-a-...or-a-yes-no-question
Best regards
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: LouisGac, toraco
The topic has been locked.
- toraco
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
6 years 1 week ago #167344
by toraco
Replied by toraco on topic I want to make the colors of Yes and No different colors
Hello LouisGac!
Thank you for the quick reply.
I tried setting the question display override.
However, the question display part is not displayed in the template editor.
Is the following wrong?
· Copy application / views / survey / * to template / {your_view_directory} / survey /
This part (template / {your_view_directory} / survey /) is
I interpret it as (template / {my_template} / {my_view_directory} / survey /) below.
Thank you very much.
Thank you for the quick reply.
I tried setting the question display override.
However, the question display part is not displayed in the template editor.
Is the following wrong?
· Copy application / views / survey / * to template / {your_view_directory} / survey /
This part (template / {your_view_directory} / survey /) is
I interpret it as (template / {my_template} / {my_view_directory} / survey /) below.
Thank you very much.
The topic has been locked.
- LouisGac
- Visitor
6 years 1 week ago #167345
by LouisGac
Replied by LouisGac on topic I want to make the colors of Yes and No different colors
It's not possible to use the template editor for question templates... even in LS3. It should be available for LS4
The topic has been locked.
- toraco
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
6 years 1 week ago #167346
by toraco
Replied by toraco on topic I want to make the colors of Yes and No different colors
Hello Joffm!
Thank you for the quick reply.
It seems my search was missing. . .
I did not know that there is a way in CSS like this! I will refer to it.
However, since there are over 100 questions, I feel that it is not valid this time.
Thank you for the quick reply.
It seems my search was missing. . .
I did not know that there is a way in CSS like this! I will refer to it.
However, since there are over 100 questions, I feel that it is not valid this time.
The topic has been locked.
- Joffm
- Away
- LimeSurvey Community Team
Less
More
- Posts: 12937
- Thank you received: 3979
6 years 1 week ago - 6 years 1 week ago #167347
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic I want to make the colors of Yes and No different colors
Hi, toraco,
If you set this in "template.css" it affects ALL "Yes/No" questions.
www.limesurvey.org/forum/installation-a-...s-no-question#166647
Regards
Joffm
If you set this in "template.css" it affects ALL "Yes/No" questions.
www.limesurvey.org/forum/installation-a-...s-no-question#166647
Regards
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 6 years 1 week ago by Joffm.
The following user(s) said Thank You: toraco
The topic has been locked.
- toraco
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
6 years 1 week ago #167350
by toraco
Replied by toraco on topic I want to make the colors of Yes and No different colors
I am grateful to Joffm for your kindness.
But, what I wanted to change is the meaning as follows.
When it is YES
.answer-container .btn-group .btn-primary {
background-color: green;
}
.answer-container .btn-group .btn-primary: hover {
background-color: light-green;
}
.answer-container .btn-group .btn-primary: active,
.answer-container .btn-group .btn-primary.active {
background-color: dark-green! important;
}
When it is NO
.answer-container .btn-group .btn-primary {
background-color: red;
}
.answer-container .btn-group .btn-primary: hover {
background-color: light-red;
}
.answer-container .btn-group .btn-primary: active,
.answer-container .btn-group .btn-primary.active {
background-color: dark-red! important;
}
Even when it is not active, you want to display YES and NO in different colors.
When it is active, I want to make each color darker.
Is this possible with CSS?
Thank you
But, what I wanted to change is the meaning as follows.
When it is YES
.answer-container .btn-group .btn-primary {
background-color: green;
}
.answer-container .btn-group .btn-primary: hover {
background-color: light-green;
}
.answer-container .btn-group .btn-primary: active,
.answer-container .btn-group .btn-primary.active {
background-color: dark-green! important;
}
When it is NO
.answer-container .btn-group .btn-primary {
background-color: red;
}
.answer-container .btn-group .btn-primary: hover {
background-color: light-red;
}
.answer-container .btn-group .btn-primary: active,
.answer-container .btn-group .btn-primary.active {
background-color: dark-red! important;
}
Even when it is not active, you want to display YES and NO in different colors.
When it is active, I want to make each color darker.
Is this possible with CSS?
Thank you
Attachments:
The topic has been locked.
- toraco
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
6 years 1 week ago #167351
by toraco
Replied by toraco on topic I want to make the colors of Yes and No different colors
Attachments:
The topic has been locked.
- Joffm
- Away
- LimeSurvey Community Team
Less
More
- Posts: 12937
- Thank you received: 3979
6 years 1 week ago - 6 years 1 week ago #167354
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic I want to make the colors of Yes and No different colors
Try this:
The "Y" and "N" refer to the button.
default:
hover:
active:
Joffm
P.S.
Up to you to set your desired colors
Code:
#label-answer{SGQ}Y.btn-primary { color: #ffff00; background-color: green;} #label-answer{SGQ}Y.btn-primary:active, #label-answer{SGQ}Y.btn-primary.active { color: #ffffff; background-color: darkgreen;} #label-answer{SGQ}Y.btn-primary:hover, #label-answer{SGQ}Y.btn-primary.hover { color: #ffffff; background-color: lightgreen;} #label-answer{SGQ}N.btn-primary { color: #00ffff; background-color: red;} #label-answer{SGQ}N.btn-primary:active, #label-answer{SGQ}N.btn-primary.active { color: #ffffff; background-color: darkred;} #label-answer{SGQ}N.btn-primary:hover, #label-answer{SGQ}N.btn-primary.hover { color: #ffffff; background-color: salmon;}
The "Y" and "N" refer to the button.
default:
hover:
active:
Joffm
P.S.
Up to you to set your desired colors
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:
Last edit: 6 years 1 week ago by Joffm.
The following user(s) said Thank You: DenisChenu
The topic has been locked.