Afficher un message
Vieux 09/03/2008, 01h09   #1
rnolty@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Want links to look like non-links

Hi -- I'm frustrated with the way :link and :visited pseudo-classes
seem to work. In the following I would expect all 4 links to be aqua.

<html>
<head>
<style type="text/css">
.cls1 {color: Aqua;}
a.cls1:visited {color: Aqua;}
.cls2 {color: Aqua;}
.inherit_color:visited {color: inherit;}
</style>
</head>
<body>

<div class="cls1"><table><tr></td>text1</tr></table><a
href="http://google.com">link1</a></div><hr />
<div class="cls1"><table><tr></td>text2</tr></table><a
href="http://google.com" class="cls1">link2</a></div><hr />
<div class="cls1"><table><tr></td>text3</tr></table><a
href="http://google.com" class="inherit_color">link3</a></div><hr />
<div class="cls2"><table><tr></td>text4</tr></table><a
href="http://google.com" class="inherit_color">link4</a></div><hr />

</body>
</html>

Both firefox and IE make link1 the browser default color for visited
links. Why is that? The inherit_color trick works for link3 and
link4 on firefox but not on IE. link2 is aqua on both platforms.

Is there a general trick (that works on IE) for making links inherit
the color they would have if they were not links, other than looking
up the tree in the DOM to figure out what class to put on every <A>
tag?

Thanks!
Bob
  Réponse avec citation
 
Page generated in 0,05157 seconds with 9 queries