[Support request] How to reduce space between post and "leave a comment"

Home Forums Support [Support request] How to reduce space between post and "leave a comment"

Home Forums Support How to reduce space between post and "leave a comment"

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #217223
    Roland

    Hi Tom,

    ich want to reduce the space between a post’s end and the line “leave a comment”, to make it clear, that the comment’s line belongs to the post above:
    How to reduce this space?

    First I tried, to eliminate the paragraph’s margin like this: p {margin-bottom: 0px;}.

    That works fine, but than I run into another problem: To separate one paragraph from the next paragraph, I had to insert blank paragraphs, empty lines. Some programs like WordPress TinyMCE delete empty paragraphs automatically, because they weren’t “correct” HTML.

    Any suggestions, how I can push the comment’s line closer to the post it belongs to?

    Kind regards
    Roland

    #217243
    Leo
    Staff
    Customer Support

    I’m not quite sure if this is the correct/best CSS to use but it seems to work:

    footer.entry-meta {
        margin-top: -20px;
    }
    #217271
    Tom
    Lead Developer
    Lead Developer

    Wouldn’t something like this work?:

    footer.entry-meta {
        margin-top: 0;
    }

    Negative values should be avoided if possible (but they aren’t evil or anything).

    #217276
    Leo
    Staff
    Customer Support

    That’s the first thing I tried but it didn’t seem to work for me in inspect element. Only moved it up a tiny little bit, almost unnoticeable..

    #217280
    Tom
    Lead Developer
    Lead Developer

    Interesting, any other elements causing spacing you can see?

    #217285
    Leo
    Staff
    Customer Support

    Don’t think so unless I missed something. When I use the inspector before changing anything I could see the 2em margin-top color in orange. When I changed it to 0 the orange color is no longer there but the space seems to remain…

    #217332
    Tom
    Lead Developer
    Lead Developer

    Hmm, I would have to see it. By default that shouldn’t happen.

    Is your blog content set to excerpt or full content?

    #217336
    Leo
    Staff
    Customer Support

    Excerpt. and yea I can show you for sure!

    #217343
    Tom
    Lead Developer
    Lead Developer

    Oh I see what’s going on. The last paragraph in the excerpt has a margin-bottom.

    Add this to your code and it should work:

    .entry-summary p:last-child {
        margin-bottom: 0;
    }
    #217353
    Leo
    Staff
    Customer Support

    Thanks Tom 🙂
    Quick summary for anyone who’s reading this, the two CSS below are required to solve this puzzle:

    .entry-summary p:last-child {
        margin-bottom: 0;
    }
    
    footer.entry-meta {
        margin-top: 0;
    }
Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.