• Resolved MemeRunner

    (@memerunner)


    I’m trying to change the color of the H2 tags on that page. And perhaps the background color.

    I’ve tried the code below in the Additional CSS Classes, but it didn’t have any impact.

    .entry-content h2 {color: #167CA8;}

    Can anyone explain what needs to go into that Additional CSS Class text field to change the color? Also, I’m trying to only do it for the block I add the code to, and not site-wide.

    Thanks
    Doug

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • In your theme’s style.css need to create a class like:

    
    .redtitle {
       color: red;
       background-color: black;
    }
    

    Then, in the H2 Advanced CSS, you would put “redtitle” without the quotes to use that style. Looks like this in the source code:
    <h2 style="text-align:center" class="redtitle">

    • This reply was modified 6 years, 2 months ago by MarkRH.
    Thread Starter MemeRunner

    (@memerunner)

    Thanks, MarkRH. I was never quite sure how that worked, but this worked great.

    I’m using the Genesis Sample theme, so just added the class info into the Customize.

    Hi MarkRH I am using GeneratePress. However, after following your instructions which worked perfectly, I also want the H2 to be full-width and responsive. How can I do that?

    Thanks,
    Sebastian

    Hi Sebastian,
    when you want the H2 full-width you have to change it in the theme;
    Customize
    Layout
    Sidebars
    Then choose for the option: content (no sidebars)

    Succes

    Paul van Mackelenbergh

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Trying to change H2 text color in Additional CSS Class’ is closed to new replies.