Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: question indent

question indent 3 years 9 months ago #50769

  • gmm37
  • gmm37's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
Dear very helpful forum users,

I am using an edited version of limespired for my survey, and this is definitely the template that I want to use.

The only problem with it is an indent on the first line of each question. I've attached a screenshot to show exactly what I mean.

Is there any way to get rid of this indent? I've looked through the html in the template editor but can't find the right code (I'm very html illiterate).

I'd be really grateful for your help.

Best wishes,

Michał
The administrator has disabled public write access.

Re:question indent 3 years 9 months ago #50770

  • gmm37
  • gmm37's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
apologies, the image didn't attach to the last post about the indent.
Last Edit: 3 years 9 months ago by gmm37.
The administrator has disabled public write access.

Re:question indent 3 years 9 months ago #50771

  • gmm37
  • gmm37's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
too computer illiterate to attach the image, hopefully this demonstrates how badly i need help!
;)
Last Edit: 3 years 9 months ago by gmm37.
The administrator has disabled public write access.

Re:question indent 3 years 9 months ago #50772

  • holch
  • holch's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 2560
  • Thank you received: 290
  • Karma: 105
The limit for the image upload is 800*800px. That is probably the problem.
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
The administrator has disabled public write access.

Re:question indent 3 years 9 months ago #50775

  • tpartner
  • tpartner's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 4069
  • Thank you received: 747
  • Karma: 341
The indent before the question text is caused by the asterisk element that is shown when a question is mandatory.

You can move it to after the question text by modifying question.pstpl and template.css.

In question.pstpl, replace the following:
<span class="asterisk">{QUESTION_MANDATORY}</span>{QUESTION_TEXT}<br />
With:
{QUESTION_TEXT}<span class="asterisk">{QUESTION_MANDATORY}</span><br />

And in template.css, replace:
.asterisk {
  color: #FF0000;
  padding: 0 5px 0 10px;
}
With:
.asterisk {
  color: #FF0000;
  padding: 0 0 0 5px;
}

Untitled_1-20101017.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.
The administrator has disabled public write access.

Re:question indent 3 years 9 months ago #50776

  • holch
  • holch's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 2560
  • Thank you received: 290
  • Karma: 105
@Tony: Do you know how the asterisk is hidden, when no mandatory question? Shouldn't a "display:none" avoid this indent?
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
The administrator has disabled public write access.

Re:question indent 3 years 9 months ago #50779

  • tpartner
  • tpartner's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 4069
  • Thank you received: 747
  • Karma: 341
If the question is not mandatory the asterisk is not inserted by quanda.php but the span that contains it remains because it's hard coded in question.pstpl.

So, as in this case, if the span has some padding it will still take up space even though it's empty.
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:question indent 3 years 9 months ago #50782

  • gmm37
  • gmm37's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
thanks enormously once again, it worked.

best wishes,

michał
The administrator has disabled public write access.

Re:question indent 3 years 9 months ago #50801

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5301
  • Thank you received: 291
  • Karma: 247
tpartner wrote:
If the question is not mandatory the asterisk is not inserted by quanda.php but the span that contains it remains because it's hard coded in question.pstpl.
Those damn hard coded elements...

Don't you think we should change this?

Will a change affect customized templates or can it be done in a way so that there are no side effects at customized templates?

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re:question indent 3 years 9 months ago #50804

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6222
  • Thank you received: 791
  • Karma: 238
Mazi wrote:
tpartner wrote:
If the question is not mandatory the asterisk is not inserted by quanda.php but the span that contains it remains because it's hard coded in question.pstpl.
Those damn hard coded elements...

Don't you think we should change this?
I think the best solution is to use another system of replacment:

Actually: mandatory/non-mandatory
<span class="asterisk">{QUESTION_MANDATORY}</span> => <span class="asterisk">*</span>
<span class="asterisk">{QUESTION_MANDATORY}</span> => <span class="asterisk"></span>

I think it's best to have some optionnal extra option:
{<span class="asterisk">QUESTION_MANDATORY</span>} => <span class="asterisk">*</span>
{<span class="asterisk">QUESTION_MANDATORY</span>} =>

In a specific template for question-help, i use some jquery to remove this div if emty ($('.question-help:empty') selector. But the best is to do in php,

I search for some regexp to do that and put in ls-dev if i found something. (when i have some time)

Another idea ?
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.464 seconds
Donation Image