CSS issue

Discussion in 'HTML' started by ricrusso, Nov 18, 2005.

  1. ricrusso

    ricrusso Guest

    I cannot understand why I don't get the same result every time on
    something simple.
    I use a css page for formatting on my own site, www.ricrusso.com.
    My links should be green (which they are).
    However, they should also be under and overlined when hovering.
    Only some links do it. I don't know why.

    Here is an example:
    http://www.ricrusso.com/sub/pc/pctips.htm

    Most links have the under/over line but if you hover down the link
    list, you will find some that don't comply. I have not added any
    overriding code to cause this.
    Thanks in advance,
    Ric
    ricrusso, Nov 18, 2005
    #1
    1. Advertising

  2. ricrusso

    Steve Pugh Guest

    ricrusso wrote:
    > I cannot understand why I don't get the same result every time on
    > something simple.
    > I use a css page for formatting on my own site, www.ricrusso.com.
    > My links should be green (which they are).
    > However, they should also be under and overlined when hovering.
    > Only some links do it. I don't know why.


    The one's that don't are the ones that you've already visited.

    > Here is an example:
    > http://www.ricrusso.com/sub/pc/pctips.htm
    >
    > Most links have the under/over line but if you hover down the link
    > list, you will find some that don't comply. I have not added any
    > overriding code to cause this.


    >From your stylesheet (just the relevant rules):


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

    When you hover over an unvisited link both the :link and :hover rules
    apply. As they have equal specificity the last specified, in this case
    :hover, is applied.

    When you hover over an visited link both the :visited and :hover rules
    apply. As they have equal specificity the last specified, in this case
    :visited, is applied.

    Place the :hover rule after the :visited rule in your stylesheet.

    Steve
    Steve Pugh, Nov 18, 2005
    #2
    1. Advertising

  3. ricrusso

    ricrusso Guest

    Perfectly articulated. Thank you. I and sure would not have figured
    that out.
    ricrusso, Nov 18, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eric
    Replies:
    4
    Views:
    700
    clintonG
    Dec 24, 2004
  2. tom watson

    print.css and screen.css

    tom watson, Sep 9, 2003, in forum: HTML
    Replies:
    1
    Views:
    452
    Jukka K. Korpela
    Sep 9, 2003
  3. Joshua Beall
    Replies:
    1
    Views:
    414
    Bertilo Wennergren
    Dec 10, 2003
  4. Noozer
    Replies:
    10
    Views:
    2,041
    Mitja
    Oct 13, 2004
  5. Titus A Ducksass - AKA broken-record
    Replies:
    6
    Views:
    642
    Titus A Ducksass - AKA broken-record
    Nov 15, 2004
Loading...

Share This Page