WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Custom css / change font colour prime press theme (6 posts)

  1. essentialwellbeing
    Member
    Posted 4 years ago #

    Hi I am using the primepress theme and want to add some colour font to H1 etc. They have an empty custom css in the edit screen but I dont know what to do with it.

    I tried copying this from the style sheet

    /*-----headings-----*/
    'body.custom h1, h2, h3, h4, h5, h6{font-weight:normal; font-family:'trebuchet MS', verdana, arial, sans-serif;}
    .entry-title, .page-title{font-size:2.2em; line-height:1; margin:0.9091em 0 0;}
    .page .entry-title, .page-template .entry-title{text-align:center;}
    .page-title{text-align:center; margin-bottom:0.9091em;}
    .sidebar h2{font-size:1.5em;}
    .entry-content h1, .entry-content h2{font-size:1.5385em; line-height:1; margin:1.5em 0 0.5em; color:100F3C }
    .entry-content h3{font-size:1.3846em; line-height:1.1111; margin:1.66665em 0 0.55555em;}
    .entry-content h4{font-size:1.2308em; font-weight:bold; line-height:1.25; margin:1.875em 0 0.625em;}
    .entry-content h5, .entry-content h6{font-size:1em; font-weight:bold; margin:2.30775em 0 0.76925em;}
    '

    changing the color reference but it didnt work. I'm really new to this so any help would be appreciated.

  2. Things like the custom.css in that theme always confuse me from an organizational standpoint. If you can, it's better to work with the actual style.css file. You can always download the theme again and replace that file if you break it.

    Look at line 71 of style.css and you'll see this:

    h1, h2, h3, h4, h5, h6{font-weight:normal; font-family:'trebuchet MS', verdana, arial, sans-serif;}

    If you wanted to add the same color to all of the headers (in this case red), you would do this:

    h1, h2, h3, h4, h5, h6{font-weight:normal; font-family:'trebuchet MS', verdana, arial, sans-serif, color: #DC143C;}

    If you wanted to change each individually, you'll have to do something like this:

    h1{font-weight:normal; font-family:'trebuchet MS', verdana, arial, sans-serif, color: #DC143C;}
    h2{font-weight:normal; font-family:'trebuchet MS', verdana, arial, sans-serif, color: #F0F8FF;}
    h3{font-weight:normal; font-family:'trebuchet MS', verdana, arial, sans-serif, color: #7FFFD4;}
    h4{font-weight:normal; font-family:'trebuchet MS', verdana, arial, sans-serif, color: #DEB887;}
    h5{font-weight:normal; font-family:'trebuchet MS', verdana, arial, sans-serif, color: #00008B;}
    h6{font-weight:normal; font-family:'trebuchet MS', verdana, arial, sans-serif, color: #DC143C;}

    Remember to clear your browser cache after you make the change, otherwise you may not see it.

  3. essentialwellbeing
    Member
    Posted 4 years ago #

    Thanks Macmanx.

    Thankyou :)

    The first thing in the style.css is "Dont make changes here , or you'll lose them in an upgrade" So I was trying to follow those directions and use the custom.css instead.

    How often do wordpress upgrade? Is that an issue really to have to redo things in there each time? I guess if you keep a record of the colour code it only takes a few seconds...

  4. You won't lose the changes in a WordPress upgrade, but you will if an upgrade to the theme is released by the developer and you overwrite the style.css file in the upgrade. In that case, you could either keep a record of the modifications that you make to the style.css file or use the custom css file.

  5. essentialwellbeing
    Member
    Posted 4 years ago #

    great! thank you so much for your help. Much appreciated :)

  6. You're welcome!

Topic Closed

This topic has been closed to new replies.

About this Topic