Archived topic
Line space before H2 tag
3 replies · Started by Siong Boon Lim on August 12, 2016
Hi,
How do I add a line space before a H2 tag?
Currently I have to manually insert a line to make up the line spacing between each H2 section.
I have tried "line-height", "margin-top", but it doesn't work on generatepress.
h2
{
text-decoration: underline;
color: #257
line-height: 3;
}
Will appreciate your help in this.
Thank you.
Hi,
Either margin-top or line-height should both work. Looks like you are missing a semicolon after "color: #257" which means it will break whatever CSS you entered below that line. Try adding the semicolon and then add the margin-top statement again? Or try just adding this:
h2 {
margin-top: 30px;
}
Let me know if it helps!
Thank you Leo.
Your solution is correct.
Manage to get the spacing right after using the correct syntax ';'
Thank you.
Glad I can help :)