A CSS pseudo class question

S

steve

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>
 
I

Ivo

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top