[Resolved] Decreasing the space below headers

This topic contains 5 replies, has 2 voices, and was last updated by  Andrew Misplon 1 year, 8 months ago.

  • Author
    Posts
  • #5802

    draesimpson
    Participant

    Hello – I would like to decrease the amount of whitespace (or padding) appearing below/above my H1, H2, H3 tags. Is this possible using custom CSS? Would also like to decrease the space between paragraph text when I enter down.

    Any feedback is greatly appreciated. Thanks!

    • This topic was modified 1 year, 8 months ago by  draesimpson.
    #5804

    Andrew Misplon
    Keymaster

    Hi 🙂 Thanks for reaching out. Sure, you can try:

    .entry-content h1,
    .entry-content h2,
    .entry-content h3,
    .entry-content h4,
    .entry-content h5,
    .entry-content h6 {
    	margin: 0;
    }
    #5805

    draesimpson
    Participant

    Thanks for the feedback Andrew! That works, however, it eliminates the space altogether. I just wanted to decrease it a bit.

    Am I locked in to only using 1 or 0? I tried 0.5 and it didn’t work

    .entry-content h1,
    .entry-content h2,
    .entry-content h3,
    .entry-content h4,
    .entry-content h5,
    .entry-content h6 {
    margin: 0.5;
    }

    Thanks!

    #5806

    Andrew Misplon
    Keymaster

    Ahh sorry for not mentioning that. In CSS only line-height can be unitless. So you can change 0 to whatever value you’d like but need to add a unit of measurement. For example: 25px;

    .entry-content h1,
    .entry-content h2,
    .entry-content h3,
    .entry-content h4,
    .entry-content h5,
    .entry-content h6 {
    	margin: 25px 0;
    }

    That means, 25px top and 25px bottom margin. You can also say:

    .entry-content h1,
    .entry-content h2,
    .entry-content h3,
    .entry-content h4,
    .entry-content h5,
    .entry-content h6 {
    	margin: 0 0 20px 0;
    }

    That’s easier to understand, the first value is top then right then bottom then left.

    #5813

    draesimpson
    Participant

    Thanks Andrew! That helped immensely! Much appreciated.

    #5814

    Andrew Misplon
    Keymaster

    Super 🙂 Glad to hear you’ve made progress.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

Scroll to top