Welcome to the LimeSurvey Community Forum

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

How to center whole table? Qtype array by column, template default:

  • crissi
  • crissi's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 4 months ago - 10 years 4 months ago #111150 by crissi
Hello dear lime survey community,

I am quite new with CSS and limesurvey. I have created a survey and I am using many question types (ranking, array, multiple choice), one I am using is the array by column question type. I am also using the default template. I have been trying arround to get the whole table to the center of the page, but I have failed!

Could somebody please help me? Column width and alignment of text within the table is fine. I would just like to have the whole thing in the center.

Do I use margin: auto? or hmmmm... help anyone? :)

Thank you very much in advance.
Last edit: 10 years 4 months ago by crissi. Reason: content error
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 years 4 months ago #111178 by tpartner
Can you activate a sample survey?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • crissi
  • crissi's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 4 months ago #111179 by crissi
Hello, thank you for answering. I have created a sample survey. I hope it is ok? I have used a slightly modified default template.

:)

agridrivers.limequery.com/index.php/768171/lang-en
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 years 4 months ago #111188 by tpartner
Tricky to do because of the widths assigned to the <col> elements by LimeSurvey, but try something like this at the end of template.css:

Code:
.array-flexible-column table.question col {
    width: auto !important;
}
 
.array-flexible-column table.subquestions-list {
  width: 75%;
}
 
.array-flexible-column table.question th.arraycaptionleft {
    width: 40%;
}
 
.array-flexible-column table.question tbody td {
    width: 20%;
}

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: crissi
The topic has been locked.
  • crissi
  • crissi's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 4 months ago #111263 by crissi
Hi, thank you very much for you answer. It made it a bit better :)
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose