- Posts: 24
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Double Array question: Sub-questions column width won't change
- RTOPS
-
Topic Author
- Offline
- Junior Member
-
Less
More
7 years 2 months ago #148338
by RTOPS
Double Array question: Sub-questions column width won't change was created by RTOPS
Hello everyone!
I am new to LM and learning
Thank you for your time.
I am trying to design a double array table, but the sub-questions column is so narrow that each questions can take up to 7-8 lines, which makes the reading very difficult. I have tried different numbers in the "(Sub-) question width:" option, but at the end it doesn’t change the sub-questions column width. I guess I will have to modify the template? I would like to extend the sub-questions columns (2-3 times wider than it is right now) and, if possible, reduce the width of the 14 answers columns.
Survey’s template: Ubuntu_orange
LM: Version 2.51.4+160908
Here is an example of the question:
I am new to LM and learning
![:) :)](/media/kunena/emoticons/1.png)
I am trying to design a double array table, but the sub-questions column is so narrow that each questions can take up to 7-8 lines, which makes the reading very difficult. I have tried different numbers in the "(Sub-) question width:" option, but at the end it doesn’t change the sub-questions column width. I guess I will have to modify the template? I would like to extend the sub-questions columns (2-3 times wider than it is right now) and, if possible, reduce the width of the 14 answers columns.
Survey’s template: Ubuntu_orange
LM: Version 2.51.4+160908
Here is an example of the question:
The topic has been locked.
- holch
-
- Offline
- LimeSurvey Community Team
-
Less
More
- Posts: 11660
- Thank you received: 2742
7 years 2 months ago #148346
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Double Array question: Sub-questions column width won't change
I see your problem here and yes, this is very little space for the subquestions. But to be honest, I don't see how to make the other columns smaller, they are already quite tight together and if they get any closer, it will start to get difficult to answer.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- RTOPS
-
Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 24
- Thank you received: 0
7 years 2 months ago - 7 years 2 months ago #148347
by RTOPS
Replied by RTOPS on topic Double Array question: Sub-questions column width won't change
Problem solved! I had to add this code to template.css :
.table{
table-layout: fixed;
}
.table{
table-layout: fixed;
}
Last edit: 7 years 2 months ago by RTOPS.
The topic has been locked.
- holch
-
- Offline
- LimeSurvey Community Team
-
Less
More
- Posts: 11660
- Thank you received: 2742
7 years 2 months ago #148348
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Double Array question: Sub-questions column width won't change
Great. Have a screen shot how it looks now?
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- RTOPS
-
Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 24
- Thank you received: 0
7 years 2 months ago - 7 years 2 months ago #148349
by RTOPS
Replied by RTOPS on topic Double Array question: Sub-questions column width won't change
Last edit: 7 years 2 months ago by RTOPS.
The topic has been locked.
- holch
-
- Offline
- LimeSurvey Community Team
-
Less
More
- Posts: 11660
- Thank you received: 2742
7 years 2 months ago #148350
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Double Array question: Sub-questions column width won't change
It's quite tight, but should be still doable to respond. Looks a lot better, but will probably not work on mobile devices anymore.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- RTOPS
-
Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 24
- Thank you received: 0
7 years 2 months ago #148351
by RTOPS
Replied by RTOPS on topic Double Array question: Sub-questions column width won't change
Thanks for the input holch!
I've used a solution from this forum. I would like to reduce the space between the 2 arrays, but I don't know what part of the code I have to modify. Here is the code I added in template.js:
$(document).ready(function(){
// Array dual-scale - assign column and scale specific classes
if($('.table-dual-scale').length > 0) {
$('.table-dual-scale thead tr:nth-child(1)').each(function(i){
var scale = 0;
$('> *', this).not('.header_answer_text').each(function(i){
if(!$(this).hasClass('header_separator')) {
$(this).addClass('scale-'+scale+'');
}
else {
scale++;
}
});
});
$('.table-dual-scale thead tr:nth-child(2)').each(function(i){
var column = 1;
var scale = 1;
$('> *', this).not('.header_answer_text').each(function(i){
if(!$(this).hasClass('header_separator')) {
$(this).addClass('scale-'+scale+' column-'+column+'');
column++;
}
else {
column = 1;
scale++;
}
});
});
$('.table-dual-scale tr.answers-list').each(function(i){
var column = 1;
var scale = 1;
$('td', this).each(function(i){
if($(this).hasClass('radio-item')) {
$(this).addClass('scale-'+scale+' column-'+column+'');
column++;
}
else if($(this).hasClass('dual_scale_separator')) {
column = 1;
scale++;
}
});
});
}
});
I've used a solution from this forum. I would like to reduce the space between the 2 arrays, but I don't know what part of the code I have to modify. Here is the code I added in template.js:
$(document).ready(function(){
// Array dual-scale - assign column and scale specific classes
if($('.table-dual-scale').length > 0) {
$('.table-dual-scale thead tr:nth-child(1)').each(function(i){
var scale = 0;
$('> *', this).not('.header_answer_text').each(function(i){
if(!$(this).hasClass('header_separator')) {
$(this).addClass('scale-'+scale+'');
}
else {
scale++;
}
});
});
$('.table-dual-scale thead tr:nth-child(2)').each(function(i){
var column = 1;
var scale = 1;
$('> *', this).not('.header_answer_text').each(function(i){
if(!$(this).hasClass('header_separator')) {
$(this).addClass('scale-'+scale+' column-'+column+'');
column++;
}
else {
column = 1;
scale++;
}
});
});
$('.table-dual-scale tr.answers-list').each(function(i){
var column = 1;
var scale = 1;
$('td', this).each(function(i){
if($(this).hasClass('radio-item')) {
$(this).addClass('scale-'+scale+' column-'+column+'');
column++;
}
else if($(this).hasClass('dual_scale_separator')) {
column = 1;
scale++;
}
});
});
}
});
The topic has been locked.
- tpartner
-
- Away
- LimeSurvey Community Team
-
Less
More
- Posts: 10109
- Thank you received: 3595
7 years 2 months ago #148363
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Double Array question: Sub-questions column width won't change
Can you activate a live example so we can see the source?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- RTOPS
-
Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 24
- Thank you received: 0
7 years 2 months ago #148370
by RTOPS
Replied by RTOPS on topic Double Array question: Sub-questions column width won't change
The topic has been locked.
- DenisChenu
-
- Offline
- LimeSurvey Community Team
-
Less
More
- Posts: 13648
- Thank you received: 2491
7 years 2 months ago #148387
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Double Array question: Sub-questions column width won't change
With already existing css ....
www.limesurvey.org/community-services/fo...-r%C3%A9ponse#148382
Add this col.separator{width:0}
www.limesurvey.org/community-services/fo...-r%C3%A9ponse#148382
Add this col.separator{width:0}
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- RTOPS
-
Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 24
- Thank you received: 0
7 years 2 months ago - 7 years 2 months ago #148413
by RTOPS
Replied by RTOPS on topic Double Array question: Sub-questions column width won't change
Hi Denis,
I've added your code to template.css, but the space between the 2 arrays is still the same. I might be doing something wrong here:
.table > thead > tr > th.header_separator, .table > tbody > tr > th.header_separator,
.table > thead > tr > td.header_separator, .table > tbody > tr > td.header_separator{
padding:0;
}
col.separator{width:0}
I've added your code to template.css, but the space between the 2 arrays is still the same. I might be doing something wrong here:
.table > thead > tr > th.header_separator, .table > tbody > tr > th.header_separator,
.table > thead > tr > td.header_separator, .table > tbody > tr > td.header_separator{
padding:0;
}
col.separator{width:0}
Last edit: 7 years 2 months ago by RTOPS.
The topic has been locked.
- tpartner
-
- Away
- LimeSurvey Community Team
-
Less
More
- Posts: 10109
- Thank you received: 3595
7 years 2 months ago #148431
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Double Array question: Sub-questions column width won't change
Your CSS selector isn't specific enough.
Code:
.table-dual-scale col.separator { width: 0; }
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.