Resolved

Decreasing the space below headers

Ultra Theme started by draesimpson Jan 24, 2017 5 replies
draesimpson Jan 24, 2017 · 9:15 pm #5802

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!

Andrew Misplon Puro Jan 24, 2017 · 9:40 pm #5804

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;
}
draesimpson Jan 24, 2017 · 11:24 pm #5805

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!

Andrew Misplon Puro Jan 24, 2017 · 11:47 pm #5806

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.

draesimpson Jan 26, 2017 · 12:44 am #5813

Thanks Andrew! That helped immensely! Much appreciated.

Andrew Misplon Puro Jan 26, 2017 · 5:47 am #5814

Super 🙂 Glad to hear you’ve made progress.

6 posts