Welcome to the LimeSurvey Community Forum

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

Left align "array by column" answers

  • CrimsonFenix
  • CrimsonFenix's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 5 months ago #126114 by CrimsonFenix
Left align "array by column" answers was created by CrimsonFenix
I am trying to find a way to left align my "array by columns" questions. It appears that by default, they are right-aligned, so they don't match the rest of the questions. See attached image. All templates provide the same result.

Thank you for your assistance.
The topic has been locked.
More
8 years 5 months ago #126140 by first
Replied by first on topic Left align "array by column" answers
See if placing below css in question source code helps.
Code:
<style>
table.question {
    margin: 0 0;
}
.answertext, .answer {
    text-align: left;
}
</style>

Survey Designer and Programmer
The topic has been locked.
  • CrimsonFenix
  • CrimsonFenix's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 5 months ago #126166 by CrimsonFenix
Replied by CrimsonFenix on topic Left align "array by column" answers
Thanks for the reply. I have tried adding the css to the template.css file, with no success.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 5 months ago #126174 by holch
Replied by holch on topic Left align "array by column" answers
Not just adding. You need to find where the text-align is defined and change it there, otherwise it might be overwritten by the old entry. And make sure you are correcting it in the right template.

Which template are you using?

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • CrimsonFenix
  • CrimsonFenix's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 5 months ago #126175 by CrimsonFenix
Replied by CrimsonFenix on topic Left align "array by column" answers
I believe I am using a copy of the basic template.

I found the place to change the alignment of the text (line 870) I changed it to left align. When I preview the survey, the text is still right aligned. Inspecting the element reveals that the alignment is still set to right. If I change the setting in the inspector, it displays properly.

Where else could this be being overwritten?
The topic has been locked.
  • CrimsonFenix
  • CrimsonFenix's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 5 months ago #126188 by CrimsonFenix
Replied by CrimsonFenix on topic Left align "array by column" answers
Ok. This is fixed. Apparently a cache issue.
The topic has been locked.
More
8 years 1 month ago #130809 by aehruesch
Replied by aehruesch on topic Left align "array by column" answers
Did you solve it somehow? Can you please post your changed ccs-code-part (I can't read the code in your screenshot)?
I tried it the way that OMdev described, but the "margin"-command shifts all my array-questions and not just the "array by column"-question.

I really would appreciate some help.

BTW: Why is the "array by column"-question right-aligned at all?

Thanks in advance,
Eric
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
8 years 1 month ago #130811 by LouisGac
Replied by LouisGac on topic Left align "array by column" answers
you should give a try to 2.5.
templates in 2.5 are totally new, using bootstrap, so it should be easy to resolve your problem
The topic has been locked.
More
8 years 1 month ago #130814 by aehruesch
Replied by aehruesch on topic Left align "array by column" answers
Ok, thanks for the fast reply,
I maybe give it a shot later. I guess I have to check that with my company first. What would change for our existing surveys if we decide to upgrade?

For now I'm interested in way for Version 2.05+. Is there a solution?
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
8 years 1 month ago #130816 by LouisGac
Replied by LouisGac on topic Left align "array by column" answers
well, if CSS can't do it, just do it with JavaScript. Should be super easy.
The topic has been locked.
  • CrimsonFenix
  • CrimsonFenix's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 1 month ago #130900 by CrimsonFenix
Replied by CrimsonFenix on topic Left align "array by column" answers
Code requested:

870 #limesurvey table.question tbody th.answertext,#limesurvey table.question tbody th.arraycaptionleft
871 {
872 text-align: left;
873 font-weight: normal;

The code changed properly, but I couldn't view it properly because the page was cached. Clear your cache after you make the change.
The topic has been locked.
More
3 years 10 months ago #199313 by SCHOOLPLATE
Replied by SCHOOLPLATE on topic Left align "array by column" answers
Hello everyone,

I know this thread 'closed' ages ago but I have the same problem.
And even though I see that you solved it, I don't know where to find the the source code... :-(

I have tried to export the data file but I don't know where to start.

And I also cannot find it in "theme options".
There is a column saying "CSS" but there is just a piece of text there.

Can someone help me with this?

I also wanted to get rid of the asteriks, but same here - I don't know where to change the source code.

Thanks to anyone in advance!

Attachments:
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose