Re: MacIE 5.0 CSS bug

At 10:21p +0100 03/28/00, Ian Hickson didst inscribe upon an 
electronic papyrus:
>On Tue, 28 Mar 2000, Walter Ian Kaye wrote:
>  > In my page I have:
>  >
>  > <STYLE TYPE="text/css">
>  >    <!--
>  >    A:link    { color: #0000FF }
>  >    A:hover   { color: #0000FF; background: #FFFF00; 
>text-decoration: underline }
>  >    A:active  { color: #000000; background: #999999; 
>text-decoration: underline }
>  >    A:visited { color: #666666 }
>  >    -->
>  > </STYLE>
>
>The cascade is working properly. What you want is the :visited above
>the :hover, since they have the same weight (011). So this is not a
>bug in MacIE5.
>
>However, even better would be:
>
>    :link { color: #0000FF; background: transparent; }
>    :visited { color: #666666; background: transparent; }
>    :link:active, :visited:active { color: #000000;
>       background: #999999; text-decoration: underline; }
>    :link:hover, :visited:hover { color: #0000FF;
>       background: #999999; text-decoration: underline; }

Almost even better -- had to also move the active to after the hover.
Here's the final result:

   A:link { color: #0000FF; background: transparent; }
    :visited { color: #666666; background: transparent; }
    :link:hover, :visited:hover { color: #0000FF;
       background: #FFFF00; text-decoration: underline; }
    :link:active, :visited:active { color: #000000;
       background: #999999; text-decoration: underline; }

I had to make it A:link to prevent IE4 from coloring submit-buttons blue!


Thanks a bunch,
-Walter

Received on Saturday, 8 April 2000 17:11:32 UTC