- This topic has 5 replies, 2 voices, and was last updated 7 years, 8 months ago by Andrew Misplon.
Tagged: h1 h2 h3 h4 h5 h6 headers headings page headers paragraph text
- AuthorPosts
- January 24, 2017 at 9:15 pm #5802
draesimpsonParticipantHello – 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!
January 24, 2017 at 9:40 pm #5804
Andrew MisplonKeymasterHi 🙂 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; }
January 24, 2017 at 11:24 pm #5805
draesimpsonParticipantThanks 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!
January 24, 2017 at 11:47 pm #5806
Andrew MisplonKeymasterAhh 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.
January 26, 2017 at 12:44 am #5813
draesimpsonParticipantThanks Andrew! That helped immensely! Much appreciated.
January 26, 2017 at 5:47 am #5814
Andrew MisplonKeymasterSuper 🙂 Glad to hear you’ve made progress.
- AuthorPosts
You must be logged in to reply to this topic.