~/naiquevin

HTML link color problem solved

Problem: Some browsers show links in the default color in spite of being styled in CSS. On hover the CSS styling works.

Problem faced in: Google Chrome and IE6. No problem in FF

Solution:It is pretty simple by the way. There are two ways to resolve this ..

  1. Dont use a:link ie. instead of
    .menu a:link {...}

just use,

    .menu a {...}

And the other way is declare the colors for all the states of the link

    .menu a:link {...}
    .menu a:visited {...}
    .menu a:hover {...}
    .menu a:active {...}

Remember the order. Its very important .. (Mnemonic - LoVe HAte)

Many thanks to: A certain CSS freak at webmasterworld forums

comments powered by Disqus