Site logo

[Resolved] CSS H2 margin on Blog post pages only

Home Forums Support [Resolved] CSS H2 margin on Blog post pages only

Home Forums Support CSS H2 margin on Blog post pages only

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1920936
    Paul

    Hi There,

    I’ve added some CSS to create add a top margin on h2 on posts

    /* Add margin above h2 in posts */
    .entry-content h2 {
    margin-top: 60px;
    }

    It works fine BUT it is also effecting the h2’s on non blog post pages. Is it possible to use a top margin value that only effects h2s within a post (not pages)?

    Cheers

    #1920958
    Leo
    Staff
    Customer Support

    Hi there,

    Try this:

    .single .entry-content h2 {
        margin-top: 60px;
    }
    #1920971
    Paul

    Perfect! Cheers Leo 🙂

    #1920984
    Leo
    Staff
    Customer Support

    Glad to help 🙂

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