- Posts: 185
- Thank you received: 11
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Example please: css classes under Display option
- bulgin
- Topic Author
- Offline
- Elite Member
Less
More
5 years 2 months ago #179703
by bulgin
Example please: css classes under Display option was created by bulgin
I have read the information on css classes here:
manual.limesurvey.org/QS:CSS_Class/en
An example would be helpful.
Using Firefox inspector I see that the class for a question label is:
<div id="question91" class="row list-radio .ls-label-question {color: blue;text-align: center; } question-container ">
If I wanted to change the .ls-label-question color, exactly what would be the method?
When I input
.ls-label-question {color: red;text-align: center; }
in the css classes nothing happens.
What is this novice doing wrong?
manual.limesurvey.org/QS:CSS_Class/en
An example would be helpful.
Using Firefox inspector I see that the class for a question label is:
<div id="question91" class="row list-radio .ls-label-question {color: blue;text-align: center; } question-container ">
If I wanted to change the .ls-label-question color, exactly what would be the method?
When I input
.ls-label-question {color: red;text-align: center; }
in the css classes nothing happens.
What is this novice doing wrong?
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
5 years 2 months ago #179709
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Example please: css classes under Display option
The CSS class setting in the question is for class names, not CSS rules. The CSS rules need to be placed in your theme custom.css file.
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: DenisChenu
The topic has been locked.
- bulgin
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 185
- Thank you received: 11
5 years 2 months ago #179713
by bulgin
Replied by bulgin on topic Example please: css classes under Display option
Thank you Tony for clearing that up for me. I now know that using a class will affect the elements after it's use.
I'm still looking for an example of what would go into that box. Do you think you could provide a simple one with an explanation of what it would do for the question that I am editing?
So, for example, I've discovered that the class for the question is:
<div class=" question-text ">
<div id="ls-question-text-298779X19X49" class=" ls-label-question ">
<p>We need to verify that you are associated with the non-profit you signed up with. Please choose your non-profit organization below.</p>
</div>
</div>
If I wanted to change the color background for only this question, would I use a different existing class here or define a class somewhere else and call it here?
Thank you.
I'm still looking for an example of what would go into that box. Do you think you could provide a simple one with an explanation of what it would do for the question that I am editing?
So, for example, I've discovered that the class for the question is:
<div class=" question-text ">
<div id="ls-question-text-298779X19X49" class=" ls-label-question ">
<p>We need to verify that you are associated with the non-profit you signed up with. Please choose your non-profit organization below.</p>
</div>
</div>
If I wanted to change the color background for only this question, would I use a different existing class here or define a class somewhere else and call it here?
Thank you.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
5 years 2 months ago #179715
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Example please: css classes under Display option
Assign a question CSS class "custom-background".
Place something like this in your theme custom.css file:
Place something like this in your theme custom.css file:
Code:
.custom-background { background-color: pink; }
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: DenisChenu, bulgin
The topic has been locked.
- bulgin
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 185
- Thank you received: 11
5 years 2 months ago #179716
by bulgin
Replied by bulgin on topic Example please: css classes under Display option
thank you! have a great day!
The topic has been locked.