Forum Moderators: open
I'm using CSS on my site to give my links a button-ish look:
a:link {color : #ADD8E6; background-color: #3399FF;}
a:visited {color : #ADD8E6; background-color: #3399FF;}
a:active {color : #D3D3D3;}
a:hover {color : #ffffff; background-color: #555555;}
Its working out nicly, except IE puts an outline around around active links. My site is in frames, and the 'butons' are meant for the nav bar. This sort of ruins the effect, IMHO.
So the question is: Is there any way to tell IE to knock it off?
You can also programmatically make all your links act the same way:
function buttonBlur() {
var lnks = document.links, i;
for (i = 0; i < lnks.length; ++i) {
lnks[i].onclick = "this.blur()"; // non-DOM2 browsers like IE
lnks[i].setAttribute("onclick", "this.blur()"); // DOM2 browser like NN7
}
}
<body onload="buttonBlur();">
Jordan
Ps. There are attributes in the CSS3 draft that will allow this behaviour to be controlled from CSS, e.g.,
outline: none none 0;...but I doubt MS will catch up to CSS3 for a long time.