By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,057 Members | 1,401 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,057 IT Pros & Developers. It's quick & easy.

How to override changed colors in links

P: n/a
I want my links to look the same as the surrounding text. Can I do that
without explicitely specifying the color to be used? What I'd really
want to do, is disable the automatic override in links, specifically for
the color, and just inherit the original color.

The next appears to work on Firefox, but not in MSIE:

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

Is there a way that will work on the common browsers?

p.s. In case you want to know why: I'm making a user interface in HTML,
where a) most of the text on a page is a link, and b) The user will soon
enough have visited almost every link anyway, and still keep on using
it. So there really is no use at all for the clown pants effect.

--
Bart.
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Mon, 14 Jun 2004 11:29:20 GMT, Bart Lateur <ba*********@pandora.be>
wrote:
I want my links to look the same as the surrounding text. Can I do that
without explicitely specifying the color to be used? What I'd really
want to do, is disable the automatic override in links, specifically for
the color, and just inherit the original color.

The next appears to work on Firefox, but not in MSIE:

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

Is there a way that will work on the common browsers?

p.s. In case you want to know why: I'm making a user interface in HTML,
where a) most of the text on a page is a link, and b) The user will soon
enough have visited almost every link anyway, and still keep on using
it. So there really is no use at all for the clown pants effect.

Colors are set by default by the UA. You set the a element, but the rule
of cascade means a:link will overrule, and that's what's blue, you see.

If you use -- a:link.plain, a:visited.plain, a:hover.plain, a:active.plain
{style} -- it should work.
Jul 20 '05 #2

P: n/a
Neal wrote:
If you use -- a:link.plain, a:visited.plain, a:hover.plain, a:active.plain
{style} -- it should work.


Same effect: works in Firefox, not in MSIE 5.5/6.0

--
Bart.
Jul 20 '05 #3

P: n/a
On Mon, 14 Jun 2004 19:25:47 GMT, Bart Lateur <ba*********@pandora.be>
wrote:
Neal wrote:
If you use -- a:link.plain, a:visited.plain, a:hover.plain,
a:active.plain
{style} -- it should work.


Same effect: works in Firefox, not in MSIE 5.5/6.0

Post a URL to a test case. It is possible you've set something in IE (I
know some browsers allow this, not sure about IE) which will override
author style sheets with regard to links. Otherwise, there's something
else wrong.
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.