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
  • bulgin's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
5 years 2 months ago #179703 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?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 2 months ago #179709 by tpartner
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
  • bulgin's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
5 years 2 months ago #179713 by bulgin
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.&nbsp; 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
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 2 months ago #179715 by tpartner
Assign a question CSS class "custom-background".



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
  • bulgin's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
5 years 2 months ago #179716 by bulgin
thank you! have a great day!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose