Search code examples
htmlcssfirefoxinternet-explorer-8sliding-doors

HTML link problem


Hi,

I have a couple of links(a) that uses sliding door, when I have visited one of the links the color of the text will change. With firebug I can see that the link gets the following style:

#signInForm a:link, a:visited {
  color: #2277BB;
  text-decoration: none;
}

The strange part is that the link do not exists inside the <div id="SignInForm"></div>? And this problem shows in FireFox but not IE8.

Pleas take a look here : http://jsfiddle.net/snowman/ecWzz/

Why do the link get this style?

BestRegards


Solution

  • #signInForm a:link selects an unvisited link within the signInForm div, a:visited selects all a:visited links. To restrict the style to just those a elements within the signInForm div use:

    #signInForm a:link, #signInForm a:visited {
         /* CSS */
    }