By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,474 Members | 1,273 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,474 IT Pros & Developers. It's quick & easy.

A CSS pseudo class question

P: n/a
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>

Aug 25 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Ivo
"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
Aug 25 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.