Visited headline links change color

Community Forums Forums General Discussion Visited headline links change color

This topic is: resolved

Tagged: 

This topic contains 3 replies, has 2 voices, and was last updated by  Sara 1 year, 5 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #37759

    Sara
    Participant
    Post count: 6

    Hi,

    I changed the color of my headlines with the code:

    h2 a:link {

    Why don’t they stay that color after they have been visited?

    I tried changing the color of visited headlines with the code:

    h2 a:visited {

    but it didn’t work.

    I am new at this.  Help?

    http://thehealthysanctuary.com
    #37777

    marybaum
    Participant
    Post count: 129

    I rarely declare the visited state. Or the :link state. I just declare the a tag and the hover state and leave it at that – and given the fact that hover is meaningless on touch devices, I’m tempted to stop with the :hover as well. There are some very accomplished people who are already giving it up.

    That said, here’s what you’ve got going in your headline styles:

    .balance-turquoise a:hover,
    .balance-turquoise h2 a,
    .balance-turquoise h2 a:visited,
    .balance-turquoise #header .menu a,
    .balance-turquoise .menu-primary a,
    .balance-turquoise .menu-secondary a {
    	color: #222;
    }
    
    .balance-turquoise h2 a:hover {
    	color: #69b5b4;
    }

    If you want your :visited state to be the turquoise, you need to move this selector

    .balance-turquoise h2 a:visited

    down to the next block (really called a rule), where you make it turquoise. Right now you have it in a block with all the things that are supposed to be dark grey. Also, you have the :hover state listed (the technical term is targeted) in the grey block as well; I’d get it out of there. It’s turning turquoise because you target it again immediately below, which overrides the previous rule. But you really don’t want the same selector (the thing you’re targeting) in there twice.

    Cheers!

    MB


    Be it ever so run down, there’s no place like FriendFeed. ;-)

    #37875

    Sara
    Participant
    Post count: 6

    Hello,

    I have done what you explained but to no avail.  Still black after being visited.  I returned the code to normal.

    Perhaps the fact that the headlines are in the sidebar needs additional coding?

    Thank you so much

     

    #41061

    Sara
    Participant
    Post count: 6

    I tried changing the grey block to blue and that took care of it! Thanks again.

    Sara

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Visited headline links change color’ is closed to new replies.