1. Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

CSS is making me ill

Discussion in 'Programming & Webmastering' started by OnePostWonder, Apr 7, 2012.

  1. OnePostWonder

    Joined:
    Dec 27, 2008
    Messages:
    579 (0.28/day)
    Thanks Received:
    107
    I just don't understand why CSS acts super picky. If you use w3schools "Try-it" editor, it's so hit and miss when it is and isn't going to work. Right now I'm focusing on links (a:link, visited, hover, active) and I'm unable to get it all to behave correctly. I know Firefox disabled this functionality because of a history leak, but that was 2 years ago (and my layout.css.visited_links_enabled is set to "True").

    Here is the "Try-it" editor:

    http://www.w3schools.com/css/tryit.asp?filename=trycss_link

    If I copy and paste the color code from a:hover, it doesn't change.

    As always, thanks in advance.

    P.S. I'm using Firefox 11.
    Last edited: Apr 7, 2012
  2. W1zzard

    W1zzard Administrator Staff Member

    Joined:
    May 14, 2004
    Messages:
    14,645 (3.93/day)
    Thanks Received:
    11,383
    maybe because the link is "visited" ?
  3. OnePostWonder

    Joined:
    Dec 27, 2008
    Messages:
    579 (0.28/day)
    Thanks Received:
    107
    I guess using colors wasn't a great example. The one that's giving me problems "text-decoration: none". Wouldn't setting a:visited as such cause the link to default back to the set a:link color?
  4. OnePostWonder

    Joined:
    Dec 27, 2008
    Messages:
    579 (0.28/day)
    Thanks Received:
    107
    This what I have in the external style sheet:

    a:link {
    text-decoration: none;
    }
    a:visited {
    text-decoration: none;
    }
    a:hover {
    text-decoration: none
    }
    a:active {
    text-decoration: none;
    }


    If I clear history, the text to defaults to the usual blue. However, once I visit the links, the link colors change to the usual purple. I'd like for them to not change at all.
  5. digibucc

    digibucc

    Joined:
    May 21, 2009
    Messages:
    4,876 (2.57/day)
    Thanks Received:
    1,473
    that's not decoration, that's color
    Easy Rhino says thanks.
  6. OnePostWonder

    Joined:
    Dec 27, 2008
    Messages:
    579 (0.28/day)
    Thanks Received:
    107
    Okay...so what should I do then?
  7. OnePostWonder

    Joined:
    Dec 27, 2008
    Messages:
    579 (0.28/day)
    Thanks Received:
    107
    Well, I looked around a bit more and I guess there is no way to keep visited links from changing color unless they are set to the unvisited link's color. In other words;

    a:link {
    color: red;
    text-decoration: none;
    }
    a:visited {
    color: red;
    text-decoration: none;
    }
    a:hover {
    text-decoration: none
    }
    a:active {
    text-decoration: none;
    }


    Though I'm pretty certain this is the case, I'd like to get a confirmation from one of the knowledgeable web designers around here (whomever that may be).

    Thanks.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guest)

Share This Page