- Posts: 21
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
<script type="text/javascript"> $(function(){ $( "<style type='text/css' media='screen and (min-width:481px)'>" + ".answers-wrapper li { display:inline;padding-right:20px !important; }" +"</style>").appendTo( "head" ); }); </script>
Ben_V wrote: you can adapt (elements, classes) something starting from:
(paste this js code in the group description or in your first question help area;)
Code:<script type="text/javascript"> $(function(){ $( "<style type='text/css' media='screen and (min-width:481px)'>" + ".answers-wrapper li { display:inline;padding-right:20px !important; }" +"</style>").appendTo( "head" ); }); </script>
.answers-wrapper li...
<script type="text/javascript"> $(function(){ $( "<style type='text/css' media='screen and (min-width:481px)'>" + ".list-radio li, td.answer li label{ text-align:left !important; display:inline !important; }" + ".list-radio li { padding-right:20px !important }" +"</style>").appendTo( "head" ); }); </script>
tammo wrote: And take care: a single line may be too long for people that answer your survey on a tablet/mobile phone....
<style type='text/css' media='screen and (min-width:481px)'>
<script type="text/javascript"> $(function(){ $( "<style type='text/css' media='screen and (min-width:481px)'>" + ".list-radio li, td.answer li label{ text-align:left !important; display:inline !important; }" + ".list-radio li { padding-right:20px !important }" +"</style>").appendTo( "head" ); }); </script>
<script type="text/javascript" charset="utf-8"> $(document).ready(function(){ $('#question{QID}').addClass('with-inline-anwers'); }); </script>
@media screen and (min-width:481px) { .list-radio.with-inline-anwers li.answer-item, .list-radio.with-inline-anwers label.answertext { text-align:left !important; display:inline !important; } .list-radio.with-inline-anwers li.answer-item { padding-right:20px !important } }
as ever... Tony bringing any javascript approach close to perfecttpartner wrote: If you want to target single questions, you could add something like this to the questions source:
tpartner wrote: In your example, you are using the "Display columns" setting. You need to remove that. Additionally, you didn't add the CSS I provided. You need to make a copy of the default template and edit it.