I have this CSS code for links on my site:
a { text-decoration:none; color:#2B5384; }
a:hover { color:#F90; }
a:visited { color:#2B5384; }
It works fine if the link looks like that: <a href="mypage.html">My page</a> – the color of the link is dark blue, on hover it changes to orange and the underline appears.
However, if I link to external website, for example <a href="http://www.facebook.com/mypage">My page</a> – on hover the link doesn’t change the color and no underline appears. It works if I change the URL to have the .html extension – <a href="http://www.facebook.com/mypage.html">My page</a>, but, obviously, there’s no such page.
Why is it happening and how can that be fixed?
see http://www.w3schools.com/css/css_pseudo_classes.asp especially the notes :
Here’s the official w3c take on it http://www.w3.org/TR/CSS2/selector.html see section 5.11.3