Black Friday Sale! Get $20 off GP Premium, $40 off our new Lifetime license, and 45% off license renewals/extensions! Learn more

[Resolved] Seperate h2, h3 topics

Home Forums Support Seperate h2, h3 topics

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #471735
    breaked

    Hi,

    I would like to style the h2 and h3 headlines separately. Is there a way to distinguish between the blog and static pages via css?

    GP Premium 1.5.6
    #471803
    Leo
    Staff
    Customer Support

    Hi there,

    I would recommend setting the static pages using Customizer > Typography, then for blog page using CSS:

    .blog h1,
    .archive h1 {
        font-size: 20px;
    }
    #471943
    breaked

    Hi Leo,

    I changed the typography via customizer. Unfortunately, nothing happens with the additional css code. I don’t know why.

    #471967
    breaked

    I tried

    .single .site-content h2 {
    	font-weight: bold;
    	border-bottom: 3px solid black;
    }
    .single .site-content h3 {
    	text-decoration: underline;
    	font-weight: bold;
    }

    But for this reason the widget title h2 also changes….

    #472366
    Leo
    Staff
    Customer Support

    Can you link me to your site?

    #472549
    breaked

    I edited the first post so you can see the link.

    I solved the problem with the following code:

    .single .site-content h2 {
    	font-weight: bold;
    	border-bottom: 3px solid black;
    }
    .single .site-content h3 {
    	text-decoration: underline;
    	font-weight: bold;
    }
    
    .widget h2 {
    	border:none !important;
    	font-weight:normal !important;
    }

    However, I don’t know why I have to set widget h2 with important.

    #472667
    Leo
    Staff
    Customer Support

    That’s because the widget is included in .site-content

    Glad you found the solution!

    #473174
    breaked

    I figured out that with

    .blog h1

    nothing happened at my site. Could you explain?!

    #473265
    Leo
    Staff
    Customer Support

    What do you mean? What’s the current issue?

    Can you let me know which elements you are referring to on your site?

    #473277
    breaked

    The problem is solved.

    But I want to know what the elements are for .blog h1,
    .archive h1 can be used.

    Blog and archive are probably solid elements?!

    #473559
    Leo
    Staff
    Customer Support

    Not quite sure what you mean still.

    You would add .blog and .archive in front of selector if you only want them to change on index pages.

    Hope this answers your question. If not let me know 🙂

    #473568
    breaked

    Sorry, maybe because of the poor English language skills. When I appeal to .blog and .archive, nothing happens to me.
    Is there something in the documentation?
    If not, not too bad. The problem has already been solved.

    #473698
    Leo
    Staff
    Customer Support

    When .blog and .archive are added, the code will only apply to the main blog page and archive pages.

    .single will make the code apply to single posts which I believe is what you were after 🙂

    #473847
    breaked

    Thanks.

    That was exactly what I’m looking for.

    #474018
    Leo
    Staff
    Customer Support
Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.