tags:

views:

58

answers:

2

Hello.. I am developing a website and everywhere i have this annoying problem... I wonder how other sites dont have this problem... any suggestion? stackoverflow has this problem as i see... http://inath.gr/ this site for example at the top menu although it has <a> tags there is no rectangle arround it when selected somehow..

+7  A: 

CSS outline property:

You can turn it off with:

<style type = "text/css">
    a {outline:0;} /*this is that dotted line you get when you select an image, I believe you're talking about the outline*/
    a img {border:0;} /*Images in links default to having a blue border, so this could be the source of another annoying rectangle*/
</style>
M2tM
thank you ! That worked great and improved a lot my site:)
Parhs
Yeah in 8 minutes, it doesnt allow me
Parhs
For completeness I've added the a img {border:0;} as well for people who stumble across this for the other common reason you'll see a rectangular border around image links.
M2tM
+2  A: 

The following is considered better because it allows users to still navigate by keyboard.

Here is a link explaining why: http://people.opera.com/patrickl/experiments/keyboard/test

a:hover, a:active { outline: none; }
Lime