Archived topic
Spacing after H1/H2/H3
5 replies · Started by John on December 12, 2016
Is there a simple way to adjust spacing after an H1/H2/H3? I find the current spacing a bit too much for my liking.
Is this a CSS adjustment or is there an alternate way to do it with CSS?
john
Hi John,
Currently CSS is required but Tom will look into adding this option in the future :)
For now try something like this:
h1, h2, h3 {
line-height: 80%;
}
Adding CSS: https://generatepress.com/knowledgebase/adding-css/
Let me know if you need more help on this.
line-height is definitely one way to do it - the issue with that is if your heading is multiple lines they'll be super close together.
Instead, I would use margin-bottom:
h1, h2, h3 {
margin-bottom: 20px;
}
Tom et al,
I'm so excited I just had to share this! Had seen the bottom margin adjustment feature in H1, H2 and H3. Was trying to adjust it in an H6. Read your CSS above and figured out - without having to post a question! - what the CSS class should be:
h6-margin-bottom.
Then I tweaked your CSS to:
h6 {
margin-bottom: 40px;
}
It worked! Couldn't believe it, but wanted to tell you about my success. You guys are proving to be great teachers as well as fabulous supporters!
Excitedly yours,
Linda
Awesome! Great job :)
Thanks, Tom. I feel brave enough to experiment more now before seeking your help (but I'm really glad you are all there when I get stuck!).
Linda