Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS - Is there a way to get rid of the selection rectangle after clicking a link?

Tags:

css

hyperlink

Is there a way to get rid of the selection rectangle when clicking a link which does not refresh the current page entirely?

like image 749
Mats Avatar asked Oct 07 '08 17:10

Mats


2 Answers

Do you mean the dotted outline of a target?

Try:

:focus {     outline: 0; } 

This would remove all focus outlines. IT's essentially the same as onclick in JavaScript terms. You might prefer to apply this to a:focus.

like image 147
Ross Avatar answered Sep 25 '22 14:09

Ross


Try adding this:

onclick="this.blur()" 

Discussed here as well

(CSS?) Eliminating browser's 'selected' lines around a hyperlinked image?

like image 23
Lou Franco Avatar answered Sep 21 '22 14:09

Lou Franco