3 replies [Last post]
YI013587
YI013587's picture
Offline
newbie
France
Last seen: 8 years 46 weeks ago
France
Timezone: GMT+2
Joined: 2012-07-25
Posts: 2
Points: 3

Hello.

When displaying a link text (<a...>text</a>) many browsers change its color and underline it.
I would like the color not to be changed, for a:link, a:visited and a:hover.

I know it is possible by redefining the color but this is not an easy solution if texts are displayed in many colors depending on whatever... For each possible text color a redefinition should be written.

So my question is : is it possible to inhibit the browser to change the color of a link. I have a begin of answer : a {color: inherit;} but this does not work for IE (6, 7, 8 at least).

Any idea ?

Gilbert

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 week 5 days ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5343
Points: 2964

Hi Gilbert, Have you

Hi Gilbert,
Have you tried:

a:link{
    color:inherit;
}

YI013587
YI013587's picture
Offline
newbie
France
Last seen: 8 years 46 weeks ago
France
Timezone: GMT+2
Joined: 2012-07-25
Posts: 2
Points: 3

Hi Tony, Thank you for your

Hi Tony,

Thank you for your answer.

Unfortunately, a:link{color:inherit;} does not work for IE6 nor IE8.

Gilbert

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 week 5 days ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5343
Points: 2964

You may have to look for a

You may have to look for a JavaScript solution, unless you can determine the surrounding text color.