PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.info.authoring.CSS > Want links to look like non-links
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Want links to look like non-links

Réponse
 
LinkBack Outils de la discussion
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
Vieux 09/03/2008, 01h33   #2
cf
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Want links to look like non-links

Of historical note on Sat, 8 Mar 2008 17:09:43 -0800 (PST)
rnolty@gmail.com scribed:

|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

This should make all the links on the page aqua (#0ff is aqua) with no underline or background color without having to add an id or class to each one; but I don't understand why you would not want visitors to know that they're links or they've visited a particular page??

<style type="text/css">
a:link {
color:#0ff;
text-decoration:none;
background-color:transparent;
}

a:visited {
color:#0ff;
text-decoration:none;
background-color:transparent;
}

a:hover {
color:#c00;
text-decoration:none;
background-color:none;
}

a:active {
color:#0ff;
text-decoration:none;
background-color:none;
}
<style type="text/css">

hth
--
cf <cfnews@NOcharterSPAM.net>
I may be dumb, but I'm not stupid.
Terry Bradshaw
  Réponse avec citation
Vieux 09/03/2008, 11h57   #3
Jukka K. Korpela
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Want links to look like non-links

Scripsit rnolty@gmail.com:

> Hi -- I'm frustrated with the way :link and :visited pseudo-classes
> seem to work.


Ignorance causes frustration.

But it doesn't really matter. The real problem is what you say on the
Subject line, and there alone. Just stop wanting such silly things. Read
this group for a week or two, or peek at the archives, to get
enlightened on this. Or Google for "Links Want To Be Links".

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

  Réponse avec citation
Vieux 09/03/2008, 13h33   #4
Stan Brown
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Want links to look like non-links

This is just silly. Why *have* a link if it's not going to look like
one?

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't You:
http://diveintomark.org/archives/200..._wont__you
  Réponse avec citation
Vieux 09/03/2008, 14h24   #5
John Hosking
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Want links to look like non-links

rnolty@gmail.com wrote:
> 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>
>


http://validator.w3.org/

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



http://css.maxdesign.com.au/selectutorial/ and
http://css.maxdesign.com.au/selectut...rial_step4.htm
also http://www.htmldog.com/guides/cssint...pseudoclasses/

--
John
The UIP, once agan: http://improve-usenet.org/
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 06h32.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,11742 seconds with 13 queries