• Since the debut of WP 3.6, something has overridden the CSS in the child theme I wrote for the TwentyTwelve template. As a result, my links have gone gray and nothing I do seems to change it back. This was the CSS in the child theme:

    a:link {
        color: #00008b;
            font-weight: bold;
            text-decoration: none;
    }
    
    a:visited {
        color: #00008b;
    }
    
    a:hover {
        color: #b22222;
            text-decoration: underline;
    }

    I was hoping that WP 3.6.1 might fix the problem; it has not. I don’t even know where to look for the problem. Can anyone help, please? Thanx.

    https://imblacknitravel.com

Viewing 8 replies - 16 through 23 (of 23 total)
  • It was blue before, and I saw the selectors there, but now the selectors are gone and it’s back to gray, but with underline. You removed the a: visited, which is leaving a dangling comma:

    .entry-content a:visited,
    .comment-content a:visited,
    {
        color: #000080;
        font-weight: bold;
        text-decoration: none;
        }

    Take that comma off, after the last a:visited:

    .entry-content a:visited,
    .comment-content a:visited
    {
        color: #000080;
        font-weight: bold;
        text-decoration: none;
        }

    Thread Starter galan05

    (@galan05)

    Done. Also changed the visited color to something completely different. Let me know what shows up. And before I forget, thank you very much for all your help!

    Visited links now showing up red and bold, underline only on hover. Non-visited links still in bold blue, Chrome & Firefox.

    Thread Starter galan05

    (@galan05)

    Close enough; I can live with it for now, even though it’s not consistent across all browsers. I like Chrome, but sometimes it makes me crazy. Again, I truly appreciate your help. Last question for the night: Is there any way I can look at the CSS for TwentyTwelve without activating it in place of my child theme?

    Hi, in your child theme custom css file, place !important after the style. This should force it to take your style over twenty twelve and will work cross browser.

    a:link {
    color: #00008b!important;
    font-weight: bold!important;
    text-decoration: none!important;
    }

    Brad
    https://www.pressedsolutions.com

    I’m not sure what you mean by looking at it without activating it. The way I examine CSS is by using either the Firebug Extension in Firefox or Chrome Developer Tools in Chrome (right-click on an element and select Inspect Element). You’ll be able to see the CSS that’s being applied to the element, and there will be a link that will take you to the exact line, in the CSS file, that’s being used.

    Of course, you can always browse the TwentyTwelve CSS file just by opening it in your browser:
    https://imblacknitravel.com/wp-content/themes/twentytwelve/style.css

    Thread Starter galan05

    (@galan05)

    Will do re !important. Much appreciate the tips for examining the CSS. Someday, I won’t be a novice at all this…but I don’t know if I’ll live that long!

    Following your advice, I think I tracked down the source of my problems. I think it’s all under “Basic Structure.”

    As far as using !important goes, IMO it should be avoided if you can figure out which selector to use. As long as you’re using the right selectors, it will work cross browser.
    When to use !important

Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘CSS being ignored in TwentyTwelve child theme’ is closed to new replies.