Internet Explorer 7 and CSS links

The worst never dies. I'm currently developing a testing site on my local machine. After implementing the server-side code, today I started applying styles to contents. First surprise: given the following CSS:

a:link, a:visited {
  color: #00f;
}
a:hover {
  color: #00c;
}

/* more styles ... */

#navigation li a:link,
#navigation li a:visited
  background: transparent;
  color: #fff;
}

#navigation li a:hover {
  background: #fff;
  color: #338;
}

The last rule doesn't work in IE7 and the background color doesn't change. It works in IE6 and 8, though. Another CSS bug of IE 7... cascade? specificity? colors? links priority? who knows?

Leave a Reply

Note: Only a member of this blog may post a comment.