|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
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/ |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
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/ |
|
![]() |
| Outils de la discussion | |
|
|