Ready to get started?Download WordPress


Changing CSS headers (2 posts)

  1. Pedalkraft
    Posted 6 months ago #

    I know this should be simple, but I can't seem to change the colour of the h2 and h3 text on my site. It's not live so I can't share a link, but it's fairly generic, I would just like to change the headers to purple rather than black. It;s a straightforward thing I've done plenty of times before, but it's just not coming through!

    I've tried this in the CSS file and also pasted it into the Custom CSS box in the Theme Options: (#600b75 is the purple).

    h2, h3, {
    color: #600b75;
    margin-bottom: 18px;

    h1, h4, h5, h6 {
    color: #000;
    margin-bottom: 18px;

    h1 { font-weight: normal; font-size: 26px; line-height: 36px; }
    h2 { font-weight: normal; font-size: 20px; line-height: 30px; color: #600b75; }
    h3 { font-weight: normal; font-size: 16px; line-height: 24px; color: #600b75; }
    h4 { font-weight: normal; font-size: 12px; line-height: 18px; }

    ...any suggestions gratefully received!

    Thanks :)


  2. paulwpxp
    Font hero
    Posted 6 months ago #

    Inspect the element and see what HTML structure it is in and what class associates with it.

    Suppose you have this in the HTML

    	<h1 class="entry-title"><a href="">Hello world</a></h1>

    and this already in the CSS

    a { color: red; }

    when you add this after it, it wouldn't work

    h1 { color: black; }


You must log in to post.

About this Theme

About this Topic