- Posts: 5
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
@media only screen and (min-width: 768px) { .columns-7 .bootstrap-buttons-div.col-sm-2 { width: 14.2857%; } }
@media only screen and (min-width: 768px) { .columns-7 .bootstrap-buttons-div.col-sm-2 { width: 14.2857%; padding-right: 3px; padding-left: 3px; } }
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ // Identify this question var thisQuestion = $('#question{QID}'); // "Row" classes $('.bootstrap-buttons-div', thisQuestion).each(function(i) { $(this).addClass('row-'+Math.ceil((i+1)/8)); }); }); </script>
.columns-8 .bootstrap-buttons-div .btn-primary { border-color: #2D7831; background-color: #328637; } .columns-8 .bootstrap-buttons-div.row-2 .btn-primary { background-color: #37943D; } .columns-8 .bootstrap-buttons-div.row-3 .btn-primary { background-color: #3DA343; } .columns-8 .bootstrap-buttons-div.row-4 .btn-primary { background-color: #42B149; } .columns-8 .bootstrap-buttons-div.row-5 .btn-primary { background-color: #4BBC51; } .columns-8 .bootstrap-buttons-div.row-6 .btn-primary { background-color: #59C15F; } .columns-8 .bootstrap-buttons-div.row-7 .btn-primary { background-color: #67D66C; } .columns-8 .bootstrap-buttons-div .btn-primary:hover { border-color: #2D7831; background-color: #2D7831; } .columns-8 .bootstrap-buttons-div .btn-primary:active, .columns-8 .bootstrap-buttons-div .btn-primary.active { border-color: #1D4D20; background-color: #1D4D20; }
.columns-8 .answer-container { max-width: 500px; }
As each row in my 7*8 matrix represents a different day of the week,
tpartner wrote: Q1
1) Add this script to the question source to assign "row" classes:
Code:<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ // Identify this question var thisQuestion = $('#question{QID}'); // "Row" classes $('.bootstrap-buttons-div', thisQuestion).each(function(i) { $(this).addClass('row-'+Math.ceil((i+1)/8)); }); }); </script>
2)Add something like this to custom.css:
Code:.columns-8 .bootstrap-buttons-div .btn-primary { border-color: #2D7831; background-color: #328637; } .columns-8 .bootstrap-buttons-div.row-2 .btn-primary { background-color: #37943D; } .columns-8 .bootstrap-buttons-div.row-3 .btn-primary { background-color: #3DA343; } .columns-8 .bootstrap-buttons-div.row-4 .btn-primary { background-color: #42B149; } .columns-8 .bootstrap-buttons-div.row-5 .btn-primary { background-color: #4BBC51; } .columns-8 .bootstrap-buttons-div.row-6 .btn-primary { background-color: #59C15F; } .columns-8 .bootstrap-buttons-div.row-7 .btn-primary { background-color: #67D66C; } .columns-8 .bootstrap-buttons-div .btn-primary:hover { border-color: #2D7831; background-color: #2D7831; } .columns-8 .bootstrap-buttons-div .btn-primary:active, .columns-8 .bootstrap-buttons-div .btn-primary.active { border-color: #1D4D20; background-color: #1D4D20; }
Q2
Add something like this to custom.css:
Code:.columns-8 .answer-container { max-width: 500px; }
www.limesurvey.org/manual/Workarounds:_M...tc..29_in_LimeSurvey1) Add this script to the question source to assign "row" classes:
www.limesurvey.org/manual/New_Template_S...n_LS3.x#Theme_Editor2)Add something like this to custom.css:
Unsure you read the answer … of @tparnerrsu_nokia_vim wrote: Hi, where I have to put this script for changing buttons color?
Thanks
tpartner wrote: Q1
1) Add this script to the question source to assign "row" classes:
[…]
2)Add something like this to custom.css:
[…]
Q2
Add something like this to custom.css: