Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #822163

    decastell
    Participant

    Is there a way to add line spacing after the end of a paragraph (without inserting </br> tags.) In other words, I want something like:

    That summer was the coldest of my entire life. Maybe it was just the people.
    “What do you think you’re doing?” my father asked. “Wasting more time, no doubt.”
    “I’m working on the gears.”
    “Working on nothing from what I can see.”

    to appear more like (only without an entire line space in between):

    That summer was the coldest of my entire life. Maybe it was just the people.

    “What do you think you’re doing?” my father asked. “Wasting more time, no doubt.”

    “I’m working on the gears.”

    “Working on nothing from what I can see.”

    #822635

    Friech
    Moderator

    Hi There,

    Thanks for writing in! That gap between paragraph is the bottom margin of the paragraph itself. So to remove that gap we need to zero out the bottom margin of the paragraph. To do that just add a class mbn to the <p> tag.

    <p class="mbn">That summer was the coldest of my entire life. Maybe it was just the people.</p>
    <p class="mbn">"What do you think you’re doing?" my father asked. "Wasting more time, no doubt."</p>
    <p class="mbn">"I’m working on the gears."</p>
    <p class="mbn">"Working on nothing from what I can see."</p>

    Hope it helps, Cheers!

    #823096

    decastell
    Participant

    Sorry, I don’t think I communicated my need clearly enough: I’m trying to get a default line space after each paragraph. Right now when I hit return, the next line starts right beneath the previous one whereas I want there to be something like a 16px gap between the previous paragraph and the new one.

    #823106

    Rupok
    Member

    Hi there,

    Thanks for clarifying. You can just place enter twice. When you are using a page break, it shouldn’t add any extra space rather will break the line. You need another page break (<br/>) to get the space.

    Or if you use separate paragraph then you will get the expected space because paragraph tag have default margin-bottom value.

    Hope this makes sense.

    Cheers!

    #823224

    decastell
    Participant

    Is there somewhere I can set the paragraph default margin-bottom value? Doing that once would be better than having to go through and manually enter extra breaks for every line in every document.

    #823239

    Rue Nel
    Moderator

    Hello There,

    By default, every paragraph has a bottom margin of 1.313em. If you want to change this, please add the following css code in the customizer, Appearance > Customize > Custom > CSS

    .site p {
        margin-bottom: 16px;
    }

    Please always keep in mind that WordPress will automatically convert line breaks to <br> tags and new lines (double space) to paragraph p tags.

    Hope this helps.

    #823296

    decastell
    Participant

    So how would I make it so that there’s extra height in the gap after a line break?

    #823325

    Paul R
    Moderator

    Hi,

    Can you provide us your site url so we can take a closer look.

    Regretfully, at this time I am not entirely certain what it is you would like to accomplish based on the information given in your post. If you wouldn’t mind providing us with a little more clarification on what it is you’re wanting to do (a link to a similar example site would be very helpful, or perhaps some screenshots), we’ll be happy to provide you with a response once we have a better understanding of the situation.

    #823339

    decastell
    Participant

    Hi There,

    I want the space between lines within a paragraph to be, for example, 14px. After hitting return, I want the space to be, for example, 20px between the two paragraphs.

    Open up any word processor and type a few lines then hit a return and start a new paragraph and you’ll see there’s extra space between paragraphs. I don’t want to have to manually wrap every paragraph inside <p> tags, but just have anything that follows a manual carriage return to have a gap.

    #823383

    Lely
    Moderator

    Hello There,

    Thank you for the clarification. Please note that using Text Element, your text is automatically wrap by a paragraph tag. The following CSS will work:

    .site p {
        margin-bottom: 16px;
    }

    When you hit enter after typing a line of text that text will be wrap by <p> tag.

    Hope this helps.

    #823480

    decastell
    Participant
    This reply has been marked as private.
    #823506

    Zeshan
    Member

    Hi there,

    I’ve checked your page and it seems you are using line break and not a complete separate paragraph (see: http://prntscr.com/ab2l77). Are you inserting the text while in Text tab (see: http://prntscr.com/ab2md8)? If so, please switch to Visual tag and it will automatically add new paragraphs whenever you press “Enter”. For line breaks, you can press “Shift + Enter”.

    Thank you!

    #823536

    decastell
    Participant

    Ah – so the problem was that I was pasting content into the text view but instead need to paste into the visual view.

    Thanks for clearing that up!

    #823542

    Darshana
    Moderator

    Glad we were able to help 🙂