WordPress.org

Ready to get started?Download WordPress

Forums

Leaf
[resolved] Line Spacing Dilemma (6 posts)

  1. trulysaucy
    Member
    Posted 1 year ago #

    Hello all

    I'm having a really hard time adjusting some line spacing. Here's my link (I just put together a test page to illustrate my issue):

    http://elv8r.com/testing-line-spacing/

    I'd like to close that gap a bit between the H2 and the paragraph text under it. I've tried changing just about every line_height value associated with H2 and body text in the CSS file to no avail. I've restored those values, so when anyone looks at the CSS now, it should look normal stock Leaf.

    Can anyone tell me where exactly I can adjust this?? Thanks!

  2. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    It's actually a margin - in this CSS:

    .entry-content h1, .comment-content h1, .entry-content h2, .comment-content h2, .entry-content h3, .comment-content h3, .entry-content h4, .comment-content h4, .entry-content h5, .comment-content h5, .entry-content h6, .comment-content h6 {
        line-height: 1.6;
        margin: 2.4rem 0;
    }

    But you should not be making any change to the theme style.css file - as those changes will be overwritten when the theme is updated. Rather add any changes via Custom CSS. If that's not an option in the theme, you an add it via a plugin such as Custom CSS Manager. To only affect the h2's, add this code:

    .entry-content h2 {
       margin-top: 1rem;
    }

    Adjust the 1rem to your liking.

  3. bradthomas127
    Member
    Theme Author

    Posted 1 year ago #

    @trulysaucy - There is a custom CSS option in Leaf options and WPyogi is right but you should also add a PX fallback for IE 6, 7, and 8 eg:

    .entry-content h2 {
       margin-top: 10px;
       margin-top: 1rem;
    }
  4. trulysaucy
    Member
    Posted 1 year ago #

    Thanks so much for the responses. I must be doing something incorrectly. Other CSS elements I've added to the Customn CSS option have appeared just fine.

    But I did add the following chunk:

    .entry-content h2 {
    margin-top: 10px;
    margin-top: 1rem;
    }

    And unfortunately, nothing happened. Any thoughts or ideas?: http://elv8r.com/testing-line-spacing/

    Thanks for all of your help!!

  5. trulysaucy
    Member
    Posted 1 year ago #

    hi all - I used another chunk of CSS and it worked. I have another issue now in that I'm able to control all H tag sizes and spacing except the size of the H1.

    I'll start a seperate thread - thanks so much again.

  6. bradthomas127
    Member
    Theme Author

    Posted 1 year ago #

    Use this for the post and page titles:

    .entry-header .entry-title {
       font-size: 22px;
       font-size: 2.9rem;
       line-height: 1.3;
       font-weight: normal;
    }

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic