tags:

views:

27

answers:

3

Hi,

this is really confusing, i don't want the browser to change the color of links, so the links color will stay same as specified in <font> . i know that i can specify a color with the property A:link , but that's not what i want.

Thanks

+1  A: 

Specify the same color for a:visited and maybe also a:hover and a:active or simply put the color inline like this:

<a href="url" style="color:#69c">link text</a>

<font> is deprecated anyway.

RegDwight
And `a:hover` has to come before `a:active` has to come before `a:visited` in the file.
Felix Kling
i know this slow way, the file will be too busy, thanks anyway ;)
David
Well, *then* just pull the `font` inside the `a`.
RegDwight
The file won't be too busy if you use an external css file and set the class of the tag. This is exactly what it was designed for and it will help you in the long run if you ever need to change the color of the links or any other element that you use CSS with. Besides the font tag is deprecated may go away sometime in the future. Check out the tutorial ( http://www.w3schools.com/CSS/css_howto.asp )
AGoodDisplayName
+1  A: 

If you don't want any coloration just do something like this:

a {
  color:inherit;
  text-decoration: none;
 }

If it still hovers, just do "a, a:hover, a:visited, a:active {...}

jak3t
You are the best. thanks so much
David
A: 

I'm pretty sure there's no way to do what you're describing. But if you want the link color to match the body text color, I'd recommend this...

The body text color came from somewhere. Probably a CSS definition. Inspect some text in Firebug to see exactly where the applied color was defined. For example, maybe it points you to a rule like this:

body { color:#666; }

Just add in your A tag right there, so it would be like this. I know it's redundant but I really don't think CSS has a way to say "inherit from one level higher in the cascade than you usually would."

body, a { color:#666; }
darkporter