WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Changing heading font (5 posts)

  1. grimlocked
    Member
    Posted 2 years ago #

    Hello,

    I'm currently working on a website locally using twenty eleven them. I created a child theme to use custom css code.

    The thing is. I want to use a different font for the headings, but I don't know what code to put in the child theme style.css.

    If I change it in the twenty eleven style.css it works, but if I copy the the code it wont work.

    h1 {
    color: #8ecc62;
    font-family: 'customfont',sans-serif;
    font-size: 15px;
    font-weight: normal;
    letter-spacing: 3px;
    line-height: 15px;
    margin-bottom: 12px;
    text-transform: uppercase;
    }

    .entry-content h1,
    .entry-content h2,
    .comment-content h1,
    .comment-content h2 {
    color: #8ecc62;
    font-family: 'customfont',sans-serif;
    font-size: 15px;
    font-weight: normal;
    letter-spacing: 3px;
    line-height: 15px;
    margin-bottom: 12px;
    text-transform: uppercase;
    }

    Some help would be appreciated :)

  2. WPyogi
    Volunteer Moderator
    Posted 2 years ago #

    Post a link to your site so someone can look at what's going on.

  3. PinkishHue
    Member
    Posted 2 years ago #

    Maybe try adding !important to the end of the line you want changed in the child theme, for example:

    font-family: 'customfont',sans-serif !important;

  4. grimlocked
    Member
    Posted 2 years ago #

    Thanks for the response guys. I'm running the site on localhost at the moment.
    Will look into it soon.

  5. grimlocked
    Member
    Posted 2 years ago #

    I think I messed up the original style.css. So I downloaded a fresh copy of 1.4 theme and then put the code again at the top. Now everything is working as it should :)

Topic Closed

This topic has been closed to new replies.

About this Topic