Check out the LimeSurvey source code on GitHub!

How to change question display.

5 years 5 months ago #63962 by frankieh
Hi all,

One of my users wants to change the centering of table cells in questions in her survey.

Specifically, she wants change the alignment of the strongly disagree/disagree/slightly disagree/neither agree nor disagree etc etc radio boxes from left aligned to center.

I can't find the CSS for those cells in the template file and if I add them it is overridden by something else.

The table cells and other relevant elements appear to be dynamically calles.
For example, the td cells are classed:
answer_cell_001 answer_cell_002 etc.

The ID of the radio buttons themselves is:

Cannot find a way to change the alignment of all the radio boxes to center in their cells.

Can anyone give me any pointers?



Please Log in to join the conversation.

5 years 5 months ago #63972 by DenisChenu

Can you tell us what is the template you use ?

You can have a look at

For a specific question, ( question number 42 for the example)
#question42 .answer td{text-align:center}
For all gender question
.gender .answer td{text-align:center}

But maybe there are some specific problem/modification with your template.


Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).

Please Log in to join the conversation.

5 years 5 months ago #64051 by frankieh
Hi Shnoulle,

Thanks for responding..

The template was based on the default 91 template with few changes so it shouldn't be the issue.

this is one of the questions we wanted to center align the radio boxes. (but all radio boxes, not just the one question.
<table class="question" summary="
	Please specify to what extent the following statements fit the innovation strategy in your company.
 - an array type question" >
	<colgroup class="col-responses">
	<col class="col-answers" width="50%" />
<col class="odd" width="6.3%" />
<col class="even" width="6.3%" />
<col class="odd" width="6.3%" />
<col class="even" width="6.3%" />
<col class="odd" width="6.3%" />
<col class="even" width="6.3%" />
<col class="odd" width="6.3%" />
<col class="col-no-answer even" width="6.3%" />
	<th>Strongly Disagree</th>
	<th>Slightly Disagree</th>
	<th>Neither Agree nor Disagree</th>
	<th>Slightly Agree</th>
	<th>Strongly Agree</th>
	<th>No answer</th>
	<tbody id='javatbd88995X618X9506EXPY1'>
<tr class="array2">
	<th class="answertext">
Out unit accepts demands that go beyond existing products and services<input type='hidden' name='tbdisp88995X618X9506EXPY1' id='tbdisp88995X618X9506EXPY1' value='on' />
<input type="hidden" name="java88995X618X9506EXPY1" id="java88995X618X9506EXPY1" value="" />
			<td class="answer_cell_001">
<label for="answer88995X618X9506EXPY1-1">
	<input class="radio" type="radio" name="88995X618X9506EXPY1" value="1" id="answer88995X618X9506EXPY1-1" title="Strongly Disagree" onclick="noop_checkconditions(this.value,, this.type)" />
			<td class="answer_cell_002">
<label for="answer88995X618X9506EXPY1-2">
	<input class="radio" type="radio" name="88995X618X9506EXPY1" value="2" id="answer88995X618X9506EXPY1-2" title="Disagree" onclick="noop_checkconditions(this.value,, this.type)" />
			<td class="answer_cell_003">
<label for="answer88995X618X9506EXPY1-3">
	<input class="radio" type="radio" name="88995X618X9506EXPY1" value="3" id="answer88995X618X9506EXPY1-3" title="Slightly Disagree" onclick="noop_checkconditions(this.value,, this.type)" />
			<td class="answer_cell_004">
<label for="answer88995X618X9506EXPY1-4">
	<input class="radio" type="radio" name="88995X618X9506EXPY1" value="4" id="answer88995X618X9506EXPY1-4" title="Neither Agree nor Disagree" onclick="noop_checkconditions(this.value,, this.type)" />
			<td class="answer_cell_005">
<label for="answer88995X618X9506EXPY1-5">
	<input class="radio" type="radio" name="88995X618X9506EXPY1" value="5" id="answer88995X618X9506EXPY1-5" title="Slightly Agree" onclick="noop_checkconditions(this.value,, this.type)" />
			<td class="answer_cell_006">
<label for="answer88995X618X9506EXPY1-6">
	<input class="radio" type="radio" name="88995X618X9506EXPY1" value="6" id="answer88995X618X9506EXPY1-6" title="Agree" onclick="noop_checkconditions(this.value,, this.type)" />
			<td class="answer_cell_007">
<label for="answer88995X618X9506EXPY1-7">
	<input class="radio" type="radio" name="88995X618X9506EXPY1" value="7" id="answer88995X618X9506EXPY1-7" title="Strongly Agree" onclick="noop_checkconditions(this.value,, this.type)" />
<label for="answer88995X618X9506EXPY1-">
	<input class="radio" type="radio" name="88995X618X9506EXPY1" value="" id="answer88995X618X9506EXPY1-" title="No answer" checked="checked" onclick="noop_checkconditions(this.value,, this.type)"  />

I tried adding this to the template.css:
.answer td{text-align:center;}

but it made no difference. (at least as tested by firefox 5)

will keep trying stuff unless you have another suggestion?

many thanks


University of Western Australia.

Please Log in to join the conversation.

5 years 5 months ago - 5 years 5 months ago #64067 by tpartner the default template the radio cells are already text-aligned center:

Or do you want to center the sub-question labels too:
table.question tbody th {
    text-align: center !important;

Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 5 years 5 months ago by tpartner.

Please Log in to join the conversation.

5 years 5 months ago #64122 by frankieh
Thanks heaps.. turns out it was caused by an old copy of template.css

I was wondering who made the decision not to center it... seeemed strange.. turns out nobody did.

thanks again


Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form