- Posts: 222
- Thank you received: 10
Ask the community, share ideas, and connect with other LimeSurvey users!
I does work, Tony. I just wanted to move the labels to the left, adjusting the padding. But the CSS code needed to be different for the simple multiple choice and multiple choice with comments. That's all.tpartner wrote: So, now I'm lost. Does the code that I provided not work?
krosser wrote: I have also tried to adjust the padding, using CSS, and this code has worked for the multiple choice with comments:
Code:.checkbox-text-item.hidden-checkbox .checkbox-item, .checkbox-text-item.hidden-checkbox .checkbox-item label { padding-left: 0; }
For multiple choice without comments, this code worked:
tpartner wrote: Can you please explain exactly what you are trying to accomplish with a mock-up, give your LimeSurvey version and attach a small sample survey (.lss file).
marcgold wrote: What I did notice is that the hyperlink on the label still activates the checkbox.
Can you explain how you managed to move the label as the code above doesn't seem to work in custom.css.
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ $('#question{QID} .answers-list li:eq(1)').addClass('hidden-checkbox'); $('#question{QID} .answers-list li:eq(7)').addClass('hidden-checkbox'); $('#question{QID} .answers-list li:eq(19)').addClass('hidden-checkbox'); $('#question{QID} .answers-list li:eq(23)').addClass('hidden-checkbox'); $('#question{QID} .hidden-checkbox input').remove(); }); </script> <style type="text/css"> #question{QID} .hidden-checkbox { padding: 0; } #question{QID} .hidden-checkbox label { padding: 0; font-weight: bold; font-style: italic; } #question{QID} .hidden-checkbox label::before, #question{QID} .hidden-checkbox label::after { display: none; } </style>
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ var qID = '{QID}'; $('li[id$="X'+qID+'t1"]').addClass('hidden-checkbox'); // SQ code t1 $('li[id$="X'+qID+'t2x1"]').addClass('hidden-checkbox'); // SQ code t2x1 $('li[id$="X'+qID+'t2x2"]').addClass('hidden-checkbox'); // SQ code t2x2 $('li[id$="X'+qID+'t2x3"]').addClass('hidden-checkbox'); // SQ code t2x3 $('#question{QID} .hidden-checkbox input').remove(); }); </script> <style type="text/css"> #question{QID} .hidden-checkbox { padding: 0; } #question{QID} .hidden-checkbox label { padding: 0; font-weight: bold; font-style: italic; } #question{QID} .hidden-checkbox label::before, #question{QID} .hidden-checkbox label::after { display: none; } </style>
asilbering wrote:
I was also wondering if there is a way to use the subquestion code to specify the check boxes to be hidden in the following line, rather than using the subquestions "number":
$('#question{QID} .answers-list li:eq(0)').addClass('hidden-checkbox');
Ana