Remove excess space in question text - help!

More
6 years 3 months ago #55994 by wian1
wian1 replied the topic: Remove excess space in question text - help!
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 months ago - 6 years 3 months ago #56043 by tpartner
tpartner replied the topic: Remove excess space in question text - help!
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 months ago by tpartner.

Please Log in to join the conversation.

More
6 years 2 months ago #57888 by wian1
wian1 replied the topic: Remove excess space in question text - help!
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
5 years 2 weeks ago #80395 by eileenchew6
eileenchew6 replied the topic: Remove excess space in question text - help!
Hi Tony,

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

Please Log in to join the conversation.

More
5 years 2 weeks ago #80396 by eileenchew6
eileenchew6 replied the topic: Remove excess space in question text - help!
This is a picture illustration..
Attachments:

Please Log in to join the conversation.

More
5 years 2 weeks ago #80397 by tpartner
tpartner replied the topic: Remove excess space in question text - help!
Eileen, can you activate a sample survey so I can see the source and relevant styles?

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
5 years 2 weeks ago - 5 years 2 weeks ago #80406 by eileenchew6
eileenchew6 replied the topic: Remove excess space in question text - help!
hi tony,

I have temporary activated the survey. this is the link of my half completed survey.


thanks!
Last Edit: 5 years 2 weeks ago by eileenchew6.

Please Log in to join the conversation.

More
5 years 2 weeks ago #80408 by tpartner
tpartner replied the topic: Remove excess space in question text - help!
It looks like you have spaces entered in the question help fields.

Check the source and remove the spaces.



Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:

Please Log in to join the conversation.

More
5 years 2 weeks ago #80409 by tpartner
tpartner replied the topic: Remove excess space in question text - help!
Hmm...it looks like you will still have a little white-space due to the padding in the question help cell.

Add the following to the end of template.js to hide that row completely if empty:
$(document).ready(function(){
 
	if($.trim($('.survey-question-help').text()) == ''){
		$('.survey-question-help').parent().hide();
	}
 
});

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: eileenchew6

Please Log in to join the conversation.

More
5 years 2 weeks ago #80410 by eileenchew6
eileenchew6 replied the topic: Remove excess space in question text - help!
Yup the problem is solved.

Thanks! (:

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now