WordPress.org

Ready to get started?Download WordPress

Forums

Expound
Changing font-color of titles on the homepage (6 posts)

  1. henry23
    Member
    Posted 7 months ago #

    I'd like to change the font-color of the post titles on the home-page to red.

    Which CSS code do I have to use?

    (I'm using the simple custom CSS plugin.)

    I put there:

    body h1 {
    color: red;
    }

    This changes all titles to red - without of the post titles on the homepage.

  2. Andrew
    Forum Moderator
    Posted 7 months ago #

  3. henry23
    Member
    Posted 7 months ago #

    Does this help http://snag.gy/4V7qO.jpg ?
    https://developers.google.com/chrome-developer-tools/

    Sorry, I'm a CSS newbie.

    The Web Developer Tool gives me the following informations about the element h1 on my expound home page.

    Ancestors:

    • html
    • body.home.blog.custom-background
    • div#page.hfeed.site
    • div#main.site-main
    • div.featured-content-secondary
    • article#post-49.post-49.post.type-post.status-publish.format-standard.hentry.category-allgemein.has-post-thumbnail
    • header.entry-header
    • h1.entry-title

    So, which CSS code do I have to use for changing the color of the h1 elements on the home page to red?

    This doesn't work for the post titles on the home page:

    body h1 {
    color: red;
    }

    Thanks for help!

  4. Andrew
    Forum Moderator
    Posted 7 months ago #

    The ones with the colour style that you want to override:
    http://snag.gy/rPwfA.jpg
    http://snag.gy/0JKdo.jpg

  5. henry23
    Member
    Posted 7 months ago #

    The ones with the colour style that you want to override:
    http://snag.gy/rPwfA.jpg
    http://snag.gy/0JKdo.jpg

    Thanks for your help.

    This code

    .featured-content .entry-title a {
    color: red;
    }

    achieves the wished result!

    But how do complete this code

    article:hover .entry-title a {
    color: red;
    }

    in order to change all states of the h1 a elements (:link, :visited etc.) to red?

  6. Konstantin Kovshenin
    Member
    Theme Author

    Posted 5 months ago #

    Can't really tell without looking at your site. Are you still having trouble changing colors with CSS?

Reply

You must log in to post.

About this Theme

About this Topic