Forums

Link color after selected question (not visited tag) (5 posts)

  1. mrkingid
    Member
    Posted 1 year ago #

    I have a situation where I a list of links that point to specific pages.

    What I want is when one link is clicked and the browser forwards to that page, the link that was clicked goes red. When the next link below gets clicked and the page forwards that link goes red, but the previous one goes back to grey.

    I know of the 4 CSS attributes:

    link
    visited
    hover
    active

    which of course are not meant to do this.

    I have tried the .selected CSS tag but it isn't working correctly.

    It list all the links as the alternate colour, not just the one that was clicked.

    demo site is at: http://artbymichaelking.com/DS/work/

    My CSS is:
    --------------
    #wnav a:link{
    color: #aaaaaa;
    text-decoration: none;
    }

    #wnav a:visited{
    color: #aaaaaa;
    text-decoration: none;
    }

    #wnav a:hover{
    color: #254A75;
    text-decoration: none;
    }

    #wnav a:active {
    color: #eeeeee;
    text-decoration: none;
    }

    #wnav .selected a{
    color: #0055FF;
    text-decoration: none;
    }
    ----------------------
    Is there a way to get this to work in WP?

  2. whooami
    Member
    Posted 1 year ago #

    Is there a way to get this to work in WP?

    that question is better asked, "is there a way to do this on the web".

    have you googled it? read well-known CSS sites, javascript sites, etc? Thats where I would start.

  3. mrkingid
    Member
    Posted 1 year ago #

    i've googled for 3 hours now.

    i was hoping someone here had done it.

    i was hoping there would be something similar to: current_page_item

  4. whooami
    Member
    Posted 1 year ago #

    http://www.google.com/search?hl=en&q=javascript+reset+link+colors&btnG=Google+Search

    if you are truly intent on breaking that standard, I see atleast two links on the first two pages of that search query that would point me in the right direction.

  5. mrkingid
    Member
    Posted 1 year ago #

    See, I wouldn't have thought of javascript!

    Thanks, looking now :D

    ****** too complicated ***

Topic Closed

This topic has been closed to new replies.

About this Topic