Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

How can I influence the distance of text lines?

  • Falk
  • Falk's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 7 months ago - 9 years 7 months ago #112230 by Falk
Hello,

how can I change the standard text line distance settings for a soft and a hard return/CR?
Just this option the editor unfortunately does not support.
At soft return lines a VERY closed together and at hard return there is already a complete line between.
How can I e.g. set a hard CR to a half line distance?

I tried it with 'div' but I failed in saving a style sheet class (e.g. with line-height: 12 pt) here when pressing ok. It is not saved in any way!

Or is this to be set in template.css eventually? If yes then please where??...
Or any other solution?...

Thank you for your feedback!
Last edit: 9 years 7 months ago by Falk.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 7 months ago #112238 by tpartner
The hard return - ENTER - inserts a paragraph (<p> element), the soft return - CTRL/ENTER - inserts a new line (<br />). This is normal editor behaviour.

You can increase the line-height style or the margin-bottom style for the <p> elements in template.css.

The exact CSS to use would vary depending on the template.


.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Falk
  • Falk's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 7 months ago #112246 by Falk
I admit I was not successful yet.
I cannot find a text part in template.css with s.th. like '<p> element', or equal.
Could you please name me the exact phrase, please?
Thank you very much.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 7 months ago #112248 by tpartner
As stated, that would depend on the template you are using.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Falk
  • Falk's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 7 months ago #112255 by Falk
okay, I am using 'limespired' template normally.
So how will I find the line distance parameters of the <p> element here?...

Remark: I supposed that template.css is always the SAME file, isn't it?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 7 months ago - 9 years 7 months ago #112258 by tpartner
If using Limespired, adding this to the end of template.css will increase the question text line-height:
Code:
.survey-question-text {
    line-height: 1.5;
}

Something like this will increase the margin-bottom of the paragraph (<p>) elements:
Code:
.survey-question-text p {
    margin-bottom: 25px;
}

So how will I find the line distance parameters of the <p> element here?...

Use the developer tools in Chrome or Firebug for Firefox.

I supposed that template.css is always the SAME file, isn't it?

Every template has a different template.css file.


.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 9 years 7 months ago by tpartner.
The topic has been locked.
  • Falk
  • Falk's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 7 months ago - 9 years 7 months ago #112261 by Falk
Thank you very much.
Do your phrases also influence the description text? This is my real intention.
Unfortunately it does not change anything right now.

A little additional request:
Could you maybe have a look to my actual article 'csv import problems of an excel file' as well?
This is even MORE important but nobody answered to it yet.
Thank you soooo much!
Last edit: 9 years 7 months ago by Falk.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 7 months ago #112274 by tpartner

Do your phrases also influence the description text?

You can use the tools described above to explore the styles affecting elements.

Could you maybe have a look to my actual article 'csv import problems of an excel file' as well?

Sorry, I cannot help with that.


.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Falk
  • Falk's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 7 months ago #112280 by Falk
I don't understand... Why should I use e.g. Firebug?
I can only see the code here.
But I can already test any influence of your css addition if I use the pages of LimeSurvey where I wanted to change the paragraph distance.

And I realised that your script does not influence the section distance of 'description' text of questions.
So I suppose that your script is not the right one, is it?...
The topic has been locked.
  • holch
  • holch's Avatar
  • Online
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 7 months ago #112284 by holch
Firebug helps you to find the correct section and css dominators to adapt the css code accordingly to your needs.

You will need a basic knowledge of HTML and CSS though to achieve your goals.

Tony's code will influence only the sections with the CSS class ".survey-question-text".

If the description text has a different CSS class, you'll need to adapt this accordingly.

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.
  • Falk
  • Falk's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 7 months ago - 9 years 7 months ago #112289 by Falk
Hello Holch,

thank you for your intervention!

Okay, I understand.
With mouse-move Firebug shows me which code part is responsible for the 'description' part.
It is div class="survey-main".

I then worked with ".survey-main p {margin-bottom: 2px;}". I can increase the section distance now but I cannot decrease it what I intended to.
Do you have an idea why not?...

By the way:
Could you maybe have a short look to my thread "General data management with LimeSurvey not clear", please?
I would wish to understand things around participants, token table, etc...
Last edit: 9 years 7 months ago by Falk.
The topic has been locked.
  • holch
  • holch's Avatar
  • Online
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 7 months ago #112290 by holch
I am quite sure that it will not be "Survey-main". Survey main sounds like the class that includes the whole survey. You'll need to find the actual element where the description is included. The elements are cascading. The "survey-main" sure has more other elements in there.

Try to understand the structure of the source code. Otherwise you'll never find it.

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.

Lime-years ahead

Online-surveys for every purse and purpose