Check out the LimeSurvey source code on GitHub!

Remove excess space in question text - help!

More
6 years 4 weeks ago #55700 by wian1
I have recently updated my LS installation from 1.71 to 1.90.
There are lots of great changes, but one problem I've found is that all questions are now displayed with lots of extra white space.

More precisely, under each question text is shown the answer options (such as text box, radio buttons, numeric input, etc). For all of my questions, these answer options have a large amount of white space above and below. When I compare to LS1.71 the space is a lot more. It looks like there are extra <b> or <p> tags somewhere.

I have tried all sorts of things to remove the space.
i) I am using a modified template based on 'basic', but I still get the same space issues when using other templates (such as default, bluengrey, clear_logo).
ii) I have tried using Firebug to work out what is causing the space, but cannot locate anything helpful
iii) I have switched off the html editor and have checked that I have no extra tags in my question text.

Has anyone else had a similar issue (can't find anything in the forums) or have any suggestions about how to reduce this white space?
Thanks.

Please Log in to join the conversation.

More
6 years 4 weeks ago #55705 by tpartner
Can you attach a screenshot or activate a sample survey?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
6 years 4 weeks ago #55710 by wian1
I've taken a screenshot of part of my survey. The lines in red show where the extra space is. You'll also see that the "tip" (Only numbers may be entered in this field) for Q5 and Q6 is misaligned with the text box. In my previous LS installation the spaces were noticeably smaller and tips lined up. Hope that helps explain what I'm trying to fix.
Attachments:

Please Log in to join the conversation.

More
6 years 4 weeks ago #55734 by tpartner
Can you activate the survey for us to see the source code?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
6 years 4 weeks ago #55741 by wian1
I'm right in the thick of developing the surevy so a bit tricky to activate just now.

What I've done instead is export a question group and imported it into the Demo site. The test survey is called "white space test" and I have used the same template that my site is based on - "basic". This test survey displays the extra white space in the same way that my survey does.

Address of survey is Demo.limesurvey.org/index.php?sid=97895&newtest=Y&lang=en

Please Log in to join the conversation.

More
6 years 4 weeks ago #55754 by tpartner
That link doesn't work. Did you set "Survey preview only for administration users" to "No" in Global Settings --> Security?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
6 years 4 weeks ago #55755 by tammo
Could this not be something to be resolved through margin/padding settings in the CSS?


Tammo ter Hark
Tools for Research
Haarlem/Amsterdam, The Netherlands

Please Log in to join the conversation.

More
6 years 4 weeks ago #55758 by wian1
I just checked the link to the test survey I set up and it's gone. Looks like Demo surveys are cleared after a short period of time. Is there any way to make it persistent? The white space is easy to replicate - any questions created using the 'basic' template (as well as several others) will show up the issue.

The space could well be a padding issue in CSS, but I've searched (in template.css) and tried all sorts of changes but so far with no luck.

Any ideas?

Please Log in to join the conversation.

More
6 years 4 weeks ago #55760 by tpartner
Okay, the best thing may be for you to attach a small sample survey and your template here.

I am happy to test it but don't have time to create matching test surveys.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
6 years 4 weeks ago #55772 by Mazi
1. Clear your browser cache so that no chached/outdated CSS file is loaded.

2. Can you reproduce the problem using the default template?

3. The space of the bottom, will it stay the same if you enter some question help text?


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
6 years 3 weeks ago #55994 by wian1
Thanks for your ideas and feedback.
I have tried to clear cache, but this makes no difference. Also, viewing the survey in FF(3.6) or IE(7) gives similar results (the white space is slightly bigger in FF). If I add Help text, the space increases. I have used the BASIC template.

I have attached here an extract from the survey I'm working on. I've tried uploading it to the Demo site, and with BASIC template selected it shows the white space I'm referring to. Hope this makes clear what I'm trying to modify.

File Attachment:

File Name: limesurvey...9329.lss
File Size:29 KB
Attachments:

Please Log in to join the conversation.

More
6 years 3 weeks ago - 6 years 3 weeks ago #56043 by tpartner
Most of the space is cell padding.

In question.pstpl, change line 5:
<table width="100%" cellspacing="0" cellpadding="8" border="0">

To:
<table width="100%" cellspacing="0" cellpadding="0" border="0">

And then add the following to the end of template.css:
.be {
	padding: 0.5em 1em;
}
 
td.answer p {
	margin-left: 1em;
}



Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
Last Edit: 6 years 3 weeks ago by tpartner.

Please Log in to join the conversation.

More
5 years 11 months ago #57888 by wian1
Thanks Tony. That's great. Your solution took care of most of the extra white space. I did notice though that in the process all white space disappeared from around text boxes in 'long free text' questions, making them look a bit cramped. To fix this I altered line 655

FROM

.numeric input,.text-short input,.text-short textarea,.text-long textarea,.text-huge textarea
{
margin-left: 1em;
}

TO

.numeric input,.text-short input,.text-short textarea,.text-long textarea,.text-huge textarea
{
margin: 1em;
}


This change added a bit more space around the text box.

Cheers,

Ian

Please Log in to join the conversation.

More
4 years 9 months ago #80395 by eileenchew6
Hi Tony,

I have tried your methods but somehow the excess space remains. Please advise? Thanks!

Please Log in to join the conversation.

More
4 years 9 months ago #80396 by eileenchew6
This is a picture illustration..
Attachments:

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form