Site logo

[Resolved] H2 Styling

Home Forums Support [Resolved] H2 Styling

Home Forums Support H2 Styling

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #723138
    Edin

    This might be a stupid question, but I want to style the h2 titles differently on the Blog-Homepage (the one that lists all articles), and h2 titles within a single post or page.

    How do I do that?

    What I have now is h2s styled with the customizer and a line on css added to the custom.css.

    How do I separate them?

    Thanks in advance!

    #723301
    David
    Staff
    Customer Support

    Hi there,

    You can use the Customizer > Colors > Content > Blog Post Title and Blog Post title hover

    #723557
    Edin

    David, you misunderstood.

    What I want to do is style the H2 headlines differently:

    – one size on the homepage (blog articles list)
    – another size when used within posts and pages

    How do I do that?

    Thanks,
    Edin

    #723606
    Leo
    Staff
    Customer Support

    So keep the customizer option for blog page, then this HTML in posts and pages:
    <h2 class="special">Special h2 style</h2>

    Then just target it with some CSS:

    h2.special {
        font-size: 20px;
        color: #fff;
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    Let me know if this helps 🙂

    #723956
    Edin

    Leo, thank you.

    In the meantime I found a solution that seems to work:

    .entry-content h2 {font-size: 32px;}

    #724053
    Leo
    Staff
    Customer Support

    Yup that will work too 🙂

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