• I’m new to WordPress and don’t know anything about CSS. I’m trying to reduce the amount of spacing between lines in my posts–in Word-speak, it looks like it’s double-spaced, when I’d rather it be 1.2 spaced. Could anyone give me some pointers, please? The site is http://www.kris-anderson.com

Viewing 5 replies - 1 through 5 (of 5 total)
  • Bill

    (@chubbycrow)

    The line height is coming from your theme’s css, naturally. In it you’ll see:

    .post-content p, .post-content blockquote, .post-content ul, .post-content ol, .post-content address, .post-content dl, .post-content .wp-caption, .post-content pre {
        line-height: 170%;
        margin-bottom: 1.1em;
    }

    You’ll need to adjust the line-height value to one that suits you better.

    When making changes to your theme styles, you’ll either want to use a custom css plugin (which you can browse here), or put it into the style sheet of a child theme. If you already have the Jetpack plugin installed, you can use its Custom CSS module.

    When you get set up, add something like:

    .post-content p, .post-content blockquote, .post-content ul, .post-content ol, .post-content address, .post-content dl, .post-content .wp-caption, .post-content pre {
        line-height: 120%;
    }

    but with an adjusted value, of course. You can remove any of the elements listed that you don’t want affected by this change, making sure to separate each with a comma.

    Thread Starter kleand

    (@kleand)

    Thank you, Bill. I’ll give it a try.

    Thread Starter kleand

    (@kleand)

    Bill, stupid question, but I think when I wrote “post” in my initial support query, I really meant page. The line spaces on each of my pages is too great. How might I adapt page formats, not post formats? Apologies!

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Prepend each of those CSS selectors with “.page”, e.g.:

    .page .post-content p, .page .post-content blockquote, .page .post-content ul [...] {
        line-height: 120%;
    }

    Bill

    (@chubbycrow)

    (Thanks, Andrew!)

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘reduce line spacing’ is closed to new replies.