[Resolved] Line space before H2 tag

Home Forums Support [Resolved] Line space before H2 tag

Home Forums Support Line space before H2 tag

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #217640
    Siong Boon Lim

    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.

    #217682
    Leo
    Staff
    Customer Support

    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!

    #217706
    Siong Boon Lim

    Thank you Leo.
    Your solution is correct.
    Manage to get the spacing right after using the correct syntax ‘;’

    Thank you.

    #217707
    Leo
    Staff
    Customer Support

    Glad I can help 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.