WordPress.org

Forums

Twenty Twelve
[resolved] Changing default font color for links and page titles (12 posts)

  1. TheDang-itBobby
    Member
    Posted 2 years ago #

    Perhaps I'm just an idiot, but in twentytwelve I can't find any way to change the default colors for links or page titles. Any help is greatly appreciated.

  2. Andrew
    Nuh uh moderator
    Posted 2 years ago #

    How familiar are you with CSS?

  3. TheDang-itBobby
    Member
    Posted 2 years ago #

    I have no problems going through my style.css and finding and altering what I'm looking for most of the time. I've been able to change the default text color and do tons of layout changes to the site I'm working on, and that's why I'm so stumped with this issue.

  4. Andrew
    Nuh uh moderator
    Posted 2 years ago #

    Have you been making changes to the theme's files?

  5. TheDang-itBobby
    Member
    Posted 2 years ago #

    I'm only changing the style.css in my child theme. No changes to the twentytwelve style.css.

  6. Andrew
    Nuh uh moderator
    Posted 2 years ago #

    Which links do you want to override?

  7. TheDang-itBobby
    Member
    Posted 2 years ago #

    I want to overwrite the font color as it appears in the sidebar widgets, footer, underneath posts, and page titles. In my body tag i have:

    font-size: 14px;
    font-size: 1rem;
    font-family: Helvetica, Arial, sans-serif;
    text-rendering: optimizeLegibility;
    color: #fff;

    and that takes care of any text in a post or page. I'd like to make that the default for everything on the site.

    As far as links go, in the body i have:

    a,
    a em,
    a strong {
    color: #eac820;
    outline: none;
    }
    a:focus,
    a:active,
    a:hover {
    color: #eac820;
    }

    This works for everything in posts or pages, but not in the sidebar or in the "posted on " " by " " underneath. The footer also remains unchanged. Do I need to add sidebar and footer php files to my child theme to affect those areas?

  8. Andrew
    Nuh uh moderator
    Posted 2 years ago #

    The issue here, I think is CSS specificity.
    Try this CSS instead;

    a,
    .widget-area .widget a,
    .comments-link a,
    .entry-meta a,
    footer[role="contentinfo"] a {
     color: deeppink;
    }
  9. TheDang-itBobby
    Member
    Posted 2 years ago #

    Excellent! That did the trick. Thanks a million.

  10. Odinkinder
    Member
    Posted 2 years ago #

    Good information Andrew. This worked for me as well, in some areas. It did not affect my links as I was hoping it would, I still have a hover state that is blue in my footer and side bar. Also, it did not seem to affect any of the links for mobile when I tested the result in my iOS simulator the links are still blue there.

    I am doing a child theme as well, I would like for my links to be red, with a hover of black, and no underline. What can you suggest?

    Thanks!

    Terry

  11. Andrew
    Nuh uh moderator
    Posted 2 years ago #

    Hi Terry, I think it would be best to start a new thread on your issue & we'll go from there.

  12. Odinkinder
    Member
    Posted 2 years ago #

    Ok.... Here it is.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic