Welcome to the LimeSurvey Community Forum

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

Left align "array by column" answers

More
9 years 11 months ago #126114 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
9 years 11 months ago #126140 by first
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.
More
9 years 11 months ago #126166 by CrimsonFenix
Thanks for the reply. I have tried adding the css to the template.css file, with no success.
The topic has been locked.
More
9 years 10 months ago #126174 by holch
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?

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
More
9 years 10 months ago #126175 by CrimsonFenix
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.
More
9 years 10 months ago #126188 by CrimsonFenix
Ok. This is fixed. Apparently a cache issue.
The topic has been locked.
More
9 years 6 months ago #130809 by aehruesch
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
  • New Member
  • New Member
More
9 years 6 months 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
9 years 6 months ago #130814 by aehruesch
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
  • New Member
  • New Member
More
9 years 6 months 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.
More
9 years 6 months ago #130900 by CrimsonFenix
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
5 years 3 months ago #199313 by SCHOOLPLATE
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!

The topic has been locked.
More
5 years 3 months ago - 5 years 3 months ago #199317 by tpartner
Extend the theme and make adjustments in the custom.css file.

- www.limesurvey.org/manual/New_Template_System_in_LS3.x

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 5 years 3 months ago by tpartner.
The following user(s) said Thank You: SCHOOLPLATE
The topic has been locked.
More
5 years 3 months ago - 5 years 3 months ago #199331 by yyuksel
extend your theme, save as a new theme :) then edit your custom.css
Be sure to use new theme in your survey

add this line
Code:
.ls-answers tbody .answertext {
 
    text-align: left;
 
}
Last edit: 5 years 3 months ago by yyuksel.
The following user(s) said Thank You: SCHOOLPLATE
The topic has been locked.
More
5 years 3 months ago #199442 by SCHOOLPLATE
THANK YOU SO MUCH! :)
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose