A CSS pseudo class question

Discussion in 'Javascript' started by steve, Aug 25, 2005.

  1. steve

    steve Guest

    Hi,

    In this code, if I remove the 2nd line A:link {TEXT-DECORATION: none},
    the eBay and Ibm will be underlined. Why? Thank you.

    <html><head><STYLE type=text/css>
    A:link {TEXT-DECORATION: none}
    A:visited {COLOR: red;}
    A:active {COLOR: purple;}
    A:hover {TEXT-DECORATION: underline;COLOR:
    green;Text-transform:uppercase}</STYLE></head>
    <body>
    <A href="http://ebay.com">eBay</A>&nbsp;&nbsp;|&nbsp;&nbsp;
    <A href="http://www.ibm.com">Ibm</A></body></html>
    steve, Aug 25, 2005
    #1
    1. Advertising

  2. steve

    Ivo Guest

    "steve" wrote
    >
    > In this code, if I remove the 2nd line A:link {TEXT-DECORATION: none},
    > the eBay and Ibm will be underlined. Why? Thank you.
    >
    > <html><head><STYLE type=text/css>
    > A:link {TEXT-DECORATION: none}
    > A:visited {COLOR: red;}
    > A:active {COLOR: purple;}
    > A:hover {TEXT-DECORATION: underline;COLOR:
    > green;Text-transform:uppercase}</STYLE></head>
    > <body>
    > <A href="http://ebay.com">eBay</A>&nbsp;&nbsp;|&nbsp;&nbsp;
    > <A href="http://www.ibm.com">Ibm</A></body></html>
    >


    Links are underlined by default in practically all browsers. To have links
    with no lines under them, you need that rule to explicitly state so. Also,
    the moment a link becomes a visited link according to the browser's memory,
    any :link pseudo-rules will no longer apply to it. They might have more
    details in a newsgroup dedicated to CSS, such as
    news:comp.infosystems.www.authoring.stylesheets.
    hth
    ivo
    Ivo, Aug 25, 2005
    #2
    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. Luigi Donatello Asero

    Class selector, ID selectors and link pseudo-classes

    Luigi Donatello Asero, Jun 4, 2005, in forum: HTML
    Replies:
    4
    Views:
    516
    Luigi Donatello Asero
    Jun 4, 2005
  2. Luigi Donatello Asero
    Replies:
    1
    Views:
    400
    Luigi Donatello Asero
    Jun 4, 2005
  3. Jonathan N. Little
    Replies:
    1
    Views:
    498
    Jonathan N. Little
    Nov 2, 2005
  4. Kevin Frey
    Replies:
    0
    Views:
    408
    Kevin Frey
    Jul 28, 2006
  5. Bob P.
    Replies:
    2
    Views:
    243
    Grant Wagner
    Jun 25, 2004
Loading...

Share This Page