How can I influence the distance of text lines?

More
3 years 2 months ago - 3 years 2 months ago #112230 by Falk
Falk created the topic: How can I influence the distance of text lines?
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: 3 years 2 months ago by Falk.

Please Log in to join the conversation.

More
3 years 2 months ago #112238 by tpartner
tpartner replied the topic: How can I influence the distance of text lines?
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.

Please Log in to join the conversation.

More
3 years 2 months ago #112246 by Falk
Falk replied the topic: How can I influence the distance of text lines?
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.

Please Log in to join the conversation.

More
3 years 2 months ago #112248 by tpartner
tpartner replied the topic: How can I influence the distance of text lines?
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.

Please Log in to join the conversation.

More
3 years 2 months ago #112255 by Falk
Falk replied the topic: How can I influence the distance of text lines?
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?

Please Log in to join the conversation.

More
3 years 2 months ago - 3 years 2 months ago #112258 by tpartner
tpartner replied the topic: How can I influence the distance of text lines?
If using Limespired, adding this to the end of template.css will increase the question text line-height:
.survey-question-text {
    line-height: 1.5;
}

Something like this will increase the margin-bottom of the paragraph (<p>) elements:
.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: 3 years 2 months ago by tpartner.

Please Log in to join the conversation.

More
3 years 2 months ago - 3 years 2 months ago #112261 by Falk
Falk replied the topic: How can I influence the distance of text lines?
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: 3 years 2 months ago by Falk.

Please Log in to join the conversation.

More
3 years 2 months ago #112274 by tpartner
tpartner replied the topic: How can I influence the distance of text lines?

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.

Please Log in to join the conversation.

More
3 years 2 months ago #112280 by Falk
Falk replied the topic: How can I influence the distance of text lines?
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?...

Please Log in to join the conversation.

More
3 years 2 months ago #112284 by holch
holch replied the topic: How can I influence the distance of text lines?
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'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
3 years 2 months ago - 3 years 2 months ago #112289 by Falk
Falk replied the topic: How can I influence the distance of text lines?
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: 3 years 2 months ago by Falk.

Please Log in to join the conversation.

More
3 years 2 months ago #112290 by holch
holch replied the topic: How can I influence the distance of text lines?
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'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
3 years 2 months ago #112291 by holch
holch replied the topic: How can I influence the distance of text lines?
Try to find where ".survey-question-text" can be found in your source code.

Usually the description should be found quite next to it.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
3 years 2 months ago - 3 years 2 months ago #112292 by Falk
Falk replied the topic: How can I influence the distance of text lines?
okay, I got it now. The solution is:
.survey-groupdescription p {
margin-top: 8px;
}

.survey-groupdescription p {
margin-bottom: 8px;
}

Top has also to be influenced. That is why the distance could be decreased only down to a special limit before.
But wouldn't it be a good idea to have that parameter as a simple button in the design editor as well??...

May I ask you...
Could you please be so kind and have a short look to my article "General data management with LimeSurvey not clear" as well? (It is very important for me to finish my survey by that!)
I would wish to understand things around participants, token table, etc...

Thank you VERY much!!
Last Edit: 3 years 2 months ago by Falk.

Please Log in to join the conversation.

More
3 years 2 months ago #112297 by holch
holch replied the topic: How can I influence the distance of text lines?
The editor is a standard tool included into Limesurvey. So I don't think it is that easy to "add a simple button".

Additionally, I think this should be organized in the template and not every survey editor should be able to do this. So my answer would be "No".

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!