468,300 Members | 1,212 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,300 developers. It's quick & easy.

How to override changed colors in links

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

Similar topics

5 posts views Thread by aznFETISH | last post: by
9 posts views Thread by michael | last post: by
11 posts views Thread by brett | last post: by
19 posts views Thread by opt_inf_env | last post: by
7 posts views Thread by Dave Y | last post: by
9 posts views Thread by Richard | last post: by
2 posts views Thread by jessicalgaudette | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.