Jump to content
TNG Community
Leif Sweden

Space between paragraphs

Recommended Posts

Leif Sweden

I have installed 10 trees at my site and at the Home page I have a Wecome text. I want to have space between paragraphs in different places in the text but don´t know how to do. When I write in the Administration part in looks good but when I switch to guest site the text is written together.

Share this post


Link to post
Share on other sites
Chris Lloyd

Tr using the html break code in between each section   -  <br />

Share this post


Link to post
Share on other sites
Leif Sweden

Thanks Chris, exactly what I wanted!

Share this post


Link to post
Share on other sites
Leif Sweden

I now discovered that this <br /> doesn´t work in Notice. When I tried it also show <br /> in the text. Is it possible to use something else in Notices?

Share this post


Link to post
Share on other sites
Chris Lloyd

Please use a screen shot to show what you mean by Notices

Share this post


Link to post
Share on other sites
tngrlkrz
9 hours ago, Leif Sweden said:

I now discovered that this <br /> doesn´t work in Notice. When I tried it also show <br /> in the text. Is it possible to use something else in Notices?

Did you try more than  one <br />?  

 

Share this post


Link to post
Share on other sites
Leif Sweden

Yes, and the it show <br /> <br />  instead of space in between.

Share this post


Link to post
Share on other sites
tngrlkrz

As Chris requested,  what is the screen or page you're having issue with that has 'notice', and post a snapshot of that page here on the forum.

Share this post


Link to post
Share on other sites
Leif Sweden

I have in Notes some text which is hard to read without space between words and paragraphs. I have tried to copy both  <br /> and after that <br /> <br /> but in Notes that did not work.

It is ni big issue . It worked fine on my first page so I tried even in Notes.

Share this post


Link to post
Share on other sites
fluffy82

Maybe I'm silly, but I always use <br> (and not <br />). That works wonderfully well.

Share this post


Link to post
Share on other sites
Leif Sweden

I guess that is perfect when you do it in plain text let say first page but I just tried in Notes and then the text contain <br> as if it is a new text.

However, this is not a big issue, I want to complete this question (how do I do then?)

Share this post


Link to post
Share on other sites
Newfloridian

Strictly speaking, in xhtml 1.0 transitional (the dialect in which TNG is written) the line break tag is defined as a self closing tag and therefore the (w3c) valid method of writing it is <br />

Alan

 

Share this post


Link to post
Share on other sites
cfj

You can try to do space with css.

Add this code in mytngstyle.css

br {
            display: block; /* makes it have a width */
            margin-top: 10px; /* change this to whatever height you want it */
}

 

Share this post


Link to post
Share on other sites
Ken Roy
On 2/11/2020 at 6:28 AM, Leif Sweden said:

I now discovered that this <br /> doesn´t work in Notice. When I tried it also show <br /> in the text. Is it possible to use something else in Notices?

I did not see an answer to Chris Lloyd's question

18 hours ago, Chris Lloyd said:

Please use a screen shot to show what you mean by Notices

Where is Notices on your web site?  Now you are also asking about

3 hours ago, Leif Sweden said:

I guess that is perfect when you do it in plain text let say first page but I just tried in Notes

There might already be ways to handle this, but the answer might depend  where in TNG you are talking about. 

Share this post


Link to post
Share on other sites
Leif Sweden
32 minutes ago, Ken Roy said:

I did not see an answer to Chris Lloyd's question

Where is Notices on your web site?  Now you are also asking about

There might already be ways to handle this, but the answer might depend  where in TNG you are talking about. 

It is mostly Notes to persons in my tree Familjen JOHNSON, if you look at my grandmother Ellen MARGARETA Rehder there is a Note when she and my grandfather went to South America. There and on other Notes for persons I tried to make space in the Notes without success.

Below you can see one of the Notes for a person (I have more)

 

Grandmother and Notes.png

Grandmother and open Notes.png

Share this post


Link to post
Share on other sites
theKiwi

I have just tried this on one of my sites...

image.png

and when I view his page I see

image.png

so it seems like it is working as expected without having to use <br /> to create the paragraph effect.

Roger

Share this post


Link to post
Share on other sites
Ken Roy

It's heck getting old... somewhere I remember an option that tells TNG  to honor line feeds in Notes.  If I use the Inspect element on a notes it shows 2 generated <br><br> within the notes area.

Sorry, I do not remember where you set the option.

Share this post


Link to post
Share on other sites
theKiwi

The "paragraphs" are handled by the PHP function nl2br - New Line to Break - which takes new line characters in text and adds the <br> or <br /> to the string to make it appear as new lines in displayed text in a browser.

So in my example I put in 2 new lines and TNG displays them using the <br />. This is how TNG Admin shows that same note

image.png

with \r representing the new line

Roger

Share this post


Link to post
Share on other sites
Ken Roy

Thanks Roger,

I thought there was an external control that told TNG to use the New Line to Break (nl2br) option, but that might have been in an older version of TNG

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×