I have html similar to this

<span><a href="link"><img.. /></a></span>

. In IE and Firefox, when the image is clicked, it highlights a box around the image. From that point on the box remains around the image. I don't want any highlighting effects whatsoever. How can I use css or an inline script to get rid of them, especially in IE?

Btw, I thought it was a:hover and a:visited and stuff like that but I tried

a:visited.myclassname{
text-decoration:none;
}

And it did not work. In IE, the developer tools showed that my inline style was getting overridden, even when I used !important with it. Why would an inline style ever get overridden? Are the browser settings themselves overriding it? And how do I fix this? (I'm probably just using the wrong property... but it is still annoying that it was getting overridden somehow)

img {
border-style:none;
}

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.