• Resolved mlzorko

    (@mlzorko)


    I have been going crazy trying to change the header (h1, h2, h3) tags in the 2012 child theme.

    This is what I have

    h1 {
    font-size: 28px;
    color: #123456;
    font-weight: bold;
    }
    h2 {
    font-size: 24px;
    color: #654321;
    font-weight: normal;
    }

    but when I I save and refresh only the font weight changes. I have tried everything!

Viewing 6 replies - 1 through 6 (of 6 total)
  • can you give us a link to your site?

    To make changes on a full size screen, you probably need to use a media query in your CSS – see line 1350 in the parent theme style.css for reference.

    Thread Starter mlzorko

    (@mlzorko)

    Looks like you also need to use more specific CSS – the h1 is being overridden by this:

    .entry-content h1, .comment-content h1 {
        font-size: 1.5rem;
        line-height: 1.5;
    }

    I see the issue.
    When making CSS there are a few basic rules to follow
    1. The last instance of the command will be the most important.
    If you declare the font-size as 14 on line 1 and declare it as 18 on line 100 – line 100 wins!
    2. Specificity, specificity, specificity!
    The more specific CSS always wins.
    EX: ‘.entry-content h1, .comment-content h1’ will win over just ‘h1’

    Thread Starter mlzorko

    (@mlzorko)

    I got it. I think. I have been using pre-designed templates now for sometime. I wanted to take 2012 and try to develop one with a child theme.

    I thought the Child Theme overrides the base theme?

    I figured the good old fashioned h1 tags would work!

    However I get it now.

    I really want to thank everyone here who helped me with this. I really appreciate you taking the time to do so.

    Michael!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to change the h1,h2,h3 size in 2012 Child Theme’ is closed to new replies.