• I’m using the theme hueman, and have created a child theme to control some style elements, one of which is link colour in the body of my posts. I’m using the following code:

    <style>
    <!–
    .entry a:link {color: #1400ED; background-color: transparent; text-decoration: underline; }
    .entry a:visited {color: #C4B7F7; text-decoration: none; }
    .entry a:hover {color: #FA0000; text-decoration: underline; }
    .site-title a { display: block; color: #1400ED; max-width: 100%; }
    –>
    </style>

    The visited and hover elements work fine, but the basic unviewed link element won’t change, no matter what I do.

    Am I correct in thinking that this child theme should override all of the parent theme’s css for post links with when done this way? Or am I missing something in my parent theme css that could be interfering?

    https://www.paranormalpeopleonline.com

Viewing 2 replies - 1 through 2 (of 2 total)
  • You have a CSS selector in the header of all of your pages that sets link color to #7a7a7a. Even though it appears you have specificity, the on-page selector is trumping your child theme style sheet. One option is to add !important to the color selector:

    .entry a:link {color: #1400ED !important; background-color: transparent; text-decoration: underline; }

    Which should override the page selector. I’m not a really big fan of !important, but in this case it might be the best way to go.

    Thread Starter Martin Clemens

    (@pyper900)

    Thanks for the advice, but even that didn’t work.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Trying to change link colour on my blog’ is closed to new replies.