Welcome, Guest
Username: Password: Remember me

TOPIC: align text left

align text left 1 year 10 months ago #81605

  • dgrimard
  • dgrimard's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 6
  • Karma: 0
Hello everyone,

I was trying to align the sub-questions in a table to the left using the text editor and it did not work in version 1.92+. I had to copy this little code : <div style="text-align: left"> that i new work from a previous lime survey version and copy-paste it at the start of every sib-question. Now it works but I find it strange to be unable to do that with the current text editor where a different code appeared and it did not work at all.

Any insights anyone?
The administrator has disabled public write access.

Re: align text left 1 year 10 months ago #81628

  • tpartner
  • tpartner's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 3818
  • Thank you received: 683
  • Karma: 328
The alignment is probably set in the template so you need to add a style rule that takes precedence (is stronger) than that.

The specifics would depend on which template you are using.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: align text left 1 year 10 months ago #81629

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5279
  • Thank you received: 289
  • Karma: 246
Please post a link to an activated sample survey so we can have a look at the source code details.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re: align text left 1 year 10 months ago #81726

  • dgrimard
  • dgrimard's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 6
  • Karma: 0
Well here is an example (the survey is in french). The first subquestion i used the current text editor and it does not alin to the left. For the rest of subquestions I used the old code <div style="text-align: left"> and it did align to the left.

Here is the link to my example: http://webdev/limesurvey/index.php?sid=82249&newtest=Y&lang=fr
The administrator has disabled public write access.

Re: align text left 1 year 10 months ago #81797

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5279
  • Thank you received: 289
  • Karma: 246
Is that survey hosted on your local machine? Because I can't access the survey.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re: align text left 1 year 8 months ago #83927

  • rejeanp
  • rejeanp's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
Hello,

One way I found interesting since only one line of code has to be changed is to edit the "template.css" file in the particular template you are using.

For instance, for the "citronade" template, I search the template.css file for the table.question custom tag and found this at line 634:

table.question tbody th.answertext,table.question tbody th.arraycaptionleft{text-align:right;}

All I did was to change the alignment of the text in this way:

table.question tbody th.answertext,table.question tbody th.arraycaptionleft{text-align:left;}

Now all your surveys using this template will have the questions (subquestions) align to the left
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.113 seconds
Donation Image