Changing the color for Headers 1,2,3 in posts

  • Unknown's avatar

    Im trying to change the color of the Headings 1,2,3 in posts. I dont want to change the color pallet since it will change the color of the entire site. I’m trying to do this trough css and cant get it to work. An example page would be: http://toddleemd.com/2015/06/23/rep-tempo/
    The headings “By:Todd lee md” or “The Concentric” which i need to be hex color #0990f4. I’ve used other coding like

    header.page-header {
    color: #0990f4;
    }
    or
    .h1 {
    color: #0990f4;
    }
    and no effect. Please help.

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hi, we can set the colors for h1, h2 and h3 in the content area with the following. You have colors specified in the post editor right now using span tags, so those will all have to be removed for the following CSS to have any effect.

    .entry-content h1 {
    color: #cc0000;
    }
    .entry-content h2 {
    color: #cc0000;
    }
    .entry-content h2 {
    color: #cc0000;
    }
  • Hi @thesacredpath, was just looking at this earlier and tried to alter the .entry-content h2/h3 colors but I was wondering why it’s not reflecting the change!

    Turns out I missed the hard-coded span color, thanks to you and well pointed out, gave me the idea to override with !important.

    This is my attempt, which shouldn’t require changing the span value:

    .entry-content h2 span {
    	color: #0990f4 !important;
    }
    
    .entry-content h3 span {
    	color: #0990f4 !important;
    }
  • Unknown's avatar

    You are welcome, and you still may have to remove the span tags. It is difficult to override things specified directly in the content HTML, such as in a span tag.

  • Indeed, just thought to present an alternate approach. Have a good day! (or maybe night!) :)

  • Unknown's avatar

    Thanks and you too. :)

  • The topic ‘Changing the color for Headers 1,2,3 in posts’ is closed to new replies.