Welcome, Guest
Username: Password: Remember me

TOPIC: Remove excess space in question text - help!

Re: Remove excess space in question text - help! 3 years 8 months ago #55994

  • wian1
  • wian1's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 7
  • Karma: 0
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_survey_79329.lss
File Size: 29 KB
The administrator has disabled public write access.

Re: Remove excess space in question text - help! 3 years 8 months ago #56043

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4277
  • Thank you received: 807
  • Karma: 370
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;
}


Untitled-1_2011-01-31.png
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Last Edit: 3 years 8 months ago by tpartner.
The administrator has disabled public write access.

Re: Remove excess space in question text - help! 3 years 7 months ago #57888

  • wian1
  • wian1's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 7
  • Karma: 0
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
The administrator has disabled public write access.

Re: Remove excess space in question text - help! 2 years 5 months ago #80395

Hi Tony,

I have tried your methods but somehow the excess space remains. Please advise? Thanks!
The administrator has disabled public write access.

Re: Remove excess space in question text - help! 2 years 5 months ago #80396

This is a picture illustration..
Attachments:
The administrator has disabled public write access.

Re: Remove excess space in question text - help! 2 years 5 months ago #80397

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4277
  • Thank you received: 807
  • Karma: 370
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: Remove excess space in question text - help! 2 years 5 months ago #80406

hi tony,

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


thanks!
Last Edit: 2 years 5 months ago by eileenchew6.
The administrator has disabled public write access.

Re: Remove excess space in question text - help! 2 years 5 months ago #80408

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4277
  • Thank you received: 807
  • Karma: 370
It looks like you have spaces entered in the question help fields.

Check the source and remove the spaces.


Capture_2012-05-14.JPG
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: Remove excess space in question text - help! 2 years 5 months ago #80409

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4277
  • Thank you received: 807
  • Karma: 370
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
The following user(s) said Thank You: eileenchew6

Re: Remove excess space in question text - help! 2 years 5 months ago #80410

Yup the problem is solved.

Thanks! (:
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.140 seconds
Donation Image