WordPress.org

Ready to get started?Download WordPress

Forums

hyperlink headings the wrong colour (5 posts)

  1. DicDonovan
    Member
    Posted 2 years ago #

    Hi everyone,

    My site - socialpirate.org - is all fine, apart from one thing. I want my links to show up purple, apart from the headings, which I want to stay #333.

    Here's my CSS for links:

    h1 a:visited {color: #333;}
    h1 a:hover {color: #999;}
    h2 a:visited {color: #333;}
    h2 a:hover {color: #999;}
    
    a {text-decoration: none;}
    a:link {color: #9e0dab; text-decoration: none;}
    a:visited {color: #9e0dab; text-decoration: none;}
    a:hover {color: #999; text-decoration: none;}

    The weird thing is it shows up perfectly when I'm logged in, but you'll see when you visit the site that the h1 and h2 rules I've set aren't working.

    Does anyone have any idea why this might be? And I've cleared the cache in numerous ways, don't think it would be that...

    Thanks in advance!

    Benedict

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    Try using Firefox with the Firebug add-on for this kind of CSS work.
    http://getfirebug.com/

    And remember to press CTRL and F5 simultaneously when viewing an updated page/site. Or try emptying your browser cache. This should ensure that your web browser fetches a fresh copy of the page rather than serving up an out-dated copy from your own cache.

    Also disable/deactivate any caching plugin(s).

  3. DicDonovan
    Member
    Posted 2 years ago #

    I use Inspect Element in Google Chrome, which I understand is pretty much the same. If you look at the CSS on the page, it says the title should be #333, #9e0dab is crossed out, but it doesn't display like that. Something odd is going on.

    I've tried all the caching things too, ctrl-refresh, deactivated all caching plugins. And I open an incognito window in Chrome to make sure a new cache is served.

    I have a fair amount of experience in CSS, but is there a way that reordering the rules could work? I've tried !important in various forms, and that hasn't helped.

  4. alchymyth
    Forum Moderator
    Posted 2 years ago #

    http://www.w3schools.com/css/css_link.asp

    I don't see that you have actually styled the header links.

  5. DicDonovan
    Member
    Posted 2 years ago #

    Oh what a moron I have been! How embarrassing...

    Thanks alchmyth for pointing out the obvious!

Topic Closed

This topic has been closed to new replies.

About this Topic