- Posts: 7
- Thank you received: 1
Ask the community, share ideas, and connect with other LimeSurvey users!
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ // Define this question var thisQuestion = $('#question{QID}'); // Move the last column $('col:nth-last-child(2)', thisQuestion).before($('col:last-child', thisQuestion)); $('col:nth-last-child(3)', thisQuestion).before($('col:nth-last-child(2)', thisQuestion)); $('col:nth-last-child(4)', thisQuestion).before($('col:nth-last-child(3)', thisQuestion)); $('table.subquestion-list tr', thisQuestion).each(function(i) { $('> *:nth-last-child(2)', this).before($('> *:last-child', this)); $('> *:nth-last-child(3)', this).before($('> *:nth-last-child(2)', this)); $('> *:nth-last-child(4)', this).before($('> *:nth-last-child(3)', this)); }); }); </script> <script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ var thisQuestion = $('#question{QID}'); // Add a question class thisQuestion.addClass('custom-array'); // Column-specific classes $('table.subquestion-list tr', thisQuestion).each(function(i) { $('th, td', this).each(function(i) { $(this).addClass('column-'+i); }); }); }); </script>
<style type="text/css">.custom-array table.subquestion-list col { width: auto !important; } /* Réglez la largeur comme vous le souhaitez! */ .custom-array table.subquestion-list thead .column-0 { width: 0%; } .custom-array table.subquestion-list thead .column-1 { width: 10%; } .custom-array table.subquestion-list thead .column-2 { width: 10%; } .custom-array table.subquestion-list thead .column-3 { width: 10%; } .custom-array table.subquestion-list thead .column-4 { width: 40%; } .custom-array table.subquestion-list thead .column-5 { width: 10%; } .custom-array table.subquestion-list thead .column-6 { width: 10%; } .custom-array table.subquestion-list thead .column-7 { width: 10%; } .ls-answers .answertextright { text-align: center; } </style>
<table align="center" border="0" cellpadding="0" cellspacing="0" style="width:784px;" width="100%">
<tbody>
<tr>
<td style="width:292px;height:85px;">
<p><span style="font-size:16px;">Certains pensent qu’il faut manger des bananes pour être en bonne santé</span></p>
</td>
<td style="width:157px;height:85px;">
<p align="center"><span style="font-size:16px;"><strong>MAIS</strong></span></p>
</td>
<td style="width:292px;height:85px;">
<p><span style="font-size:16px;">D’autres pensent qu’il faut manger des pommes pour être en bonne santé</span></p>
</td>
</tr>
</tbody>
</table>
<table align="center" border="0" cellpadding="0" cellspacing="0" style="width:100%;">
<tbody>
<tr>
<td style="width:20%;height:85px;text-align:center;font-size:16px;">
<strong>MAIS</strong>
</td>
<td style="width:40%;height:85px;">
<span style="font-size:16px;">D’autres pensent qu’il faut manger des pommes pour être en bonne santé</span>
</td>
<td style="width:40%;height:85px;">
<span style="font-size:16px;">Certains pensent qu’il faut manger des bananes pour être en bonne santé</span>
</td>
</tr>
</tbody>
</table>
<div class="row row-no-gutters" style="font-size:16px;">
<div class="col-md-5">
Certains pensent qu’il faut manger des bananes pour être en bonne santé
</div>
<div class="col-md-2" style="font-weight:bold">
MAIS
</div>
<div class="col-md-5" >
D’autres pensent qu’il faut manger des pommes pour être en bonne santé
</div>
</div>