How to override changed colors in links

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bart Lateur

    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.
  • Neal

    #2
    Re: How to override changed colors in links

    On Mon, 14 Jun 2004 11:29:20 GMT, Bart Lateur <bart.lateur@pa ndora.be>
    wrote:
    [color=blue]
    > 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.
    >[/color]


    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.

    Comment

    • Bart Lateur

      #3
      Re: How to override changed colors in links

      Neal wrote:
      [color=blue]
      >If you use -- a:link.plain, a:visited.plain , a:hover.plain, a:active.plain
      >{style} -- it should work.[/color]

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

      --
      Bart.

      Comment

      • Neal

        #4
        Re: How to override changed colors in links

        On Mon, 14 Jun 2004 19:25:47 GMT, Bart Lateur <bart.lateur@pa ndora.be>
        wrote:
        [color=blue]
        > Neal wrote:
        >[color=green]
        >> If you use -- a:link.plain, a:visited.plain , a:hover.plain,
        >> a:active.plain
        >> {style} -- it should work.[/color]
        >
        > Same effect: works in Firefox, not in MSIE 5.5/6.0
        >[/color]


        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.

        Comment

        Working...