Alterar estilo h4

  • Author
    Posts
  • #83965

    otjeremy
    Member

    It doesn’t appear to be added: https://cloudup.com/cJD2XhKYo7a (you can see where the color is coming from with the .entry-content a selector, which was my original suggestion addition – but this is coming from the theme).

    I’m going to tag a happiness engineer to see if they’re able to double check the styling that you’re adding.

    Thanks!

    #83977

    The problem is with the new layout “massive press”. Not the current. I am in the process of change to the layout “Massive Press”. If activating the “massive press” the problem persists you notice again. Thank you.

    #83981

    kathrynwp
    Staff

    It looks like you’re currently running the theme Plane here: http://denzingerbergoglio.com/

    Once you switch your site to Massive Press and add the CSS, we’ll be able to help you troubleshoot further. Right now, it’s extremely confusing as Jeremy is giving you CSS that applies to Massive Press, but you’re running a different theme. Let us know when your site is running Massive Press.

    #84000

    Ok. Thanks!

    #84063

    Already on Massive Press. From what I see, the indicated command alters various parts of the blog, but does not alter the content of my pages.

    #84064

    kathrynwp
    Staff

    Instead of

    h3 {
         background-color: #e6f5f5;
    }
    h4 {
         background-color: #e6f5f5;
    }

    …try:

    .entry-content h3 {
        background-color: #e6f5f5;
    }
    .entry-content h4 {
        background-color: #e6f5f5;
    }

    You need to target the elements within .entry-content to override the theme’s defaults.

    #84065

    The background-color works well. What I do not get is change the color style and h3 h4 on my pages. Just change the rest of the blog.

    #84066

    kathrynwp
    Staff

    Since some of your heading tags have links inside them, you’ll need to add the anchor tag to target those. This should cover both linked and unlinked headings in your posts:

    .entry-content h3, .entry-content h3 a {
         color: #bb00bb;
    }
    
    .entry-content h4, .entry-content h4 a {
         color: #008000;
    }

    Replace the example colours with whatever you like.

    #84067

    Fantastic. The H3 works perfect. But not H4. Am I doing something wrong?

    #84068

    kathrynwp
    Staff

    denzingerbergoglio – could you provide a specific link to a post where you have an h4 that’s not picking up your custom colour?

    #84069
    #84070

    kathrynwp
    Staff

    In your theme, words with the strong tag around them are set as a specific colour in the stylesheet:

    .entry-content strong {
        color: #555555;
    }

    This is overriding your custom CSS, so you need another style to target them:

    .entry-content h4 strong {
    	color: #bb00bb;
    }

    If you need further CSS customization help in the future, feel free to post in the forum:

    https://en.forums.wordpress.com/forum/css-customization

    #84071

    Thank you!! Now I got it. I do not understand what I was doing wrong.

    #84072

    I do not know if the problem is the same, but I can not remove the link line when the H3 is a link. The “text-decoration: none” command fails.

    #84073

    kathrynwp
    Staff

    Thank you!! Now I got it. I do not understand what I was doing wrong.

    It has to do with something called CSS specificity. To override a theme’s CSS you need to have a CSS declaration that’s specific enough. Your CSS was not specific enough in these cases. You can learn more about CSS and specificity here:
    https://cssworkshop.wordpress.com/

    I do not know if the problem is the same, but I can not remove the link line when the H3 is a link. The “text-decoration: none” command fails.

    Could you please post in the CSS Customization forum and provide a link to a specific post where you’re having this issue:

    https://en.forums.wordpress.com/forum/css-customization

    The volunteers and staff there will be glad to help.

    I’m going to close this thread now but do post in the CSS Customization forum to get any remaining CSS issues sorted. Thanks!

The topic ‘Alterar estilo h4’ is closed to new replies.