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

StackOverflow https://stackoverflow.com/questions/179510

  •  05-07-2019
  •  | 
  •  

Question

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

Was it helpful?

Solution

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.

OTHER TIPS

Try adding this:

onclick="this.blur()"

Discussed here as well

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top