Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I remove outline on link click?

When I click a link on my website it is creating an outline around the link like so

enter image description here

I've tried adding:

a.image-link:focus { outline: 0; } 

and

a {outline : none;} 

But nothing seems to get rid of it. Is there a way to remove it?

like image 367
SaturnsEye Avatar asked Jan 06 '16 14:01

SaturnsEye


People also ask

How do I remove a link outline in CSS?

Using the CSS rule :focus { outline: none; } to remove an outline on an object causes the link or control to be focusable, but removes any visible indication of focus for keyboard users. Methods to remove it such as onfocus="blur()" result in keyboard users being unable to interact with the link or control.

How do you remove an outline in HTML?

Example of removing the focus around an HTML <a> tag: Here, we use the :focus pseudo-class on the <input> element and set both the outline and box-shadow properties to "none".

How do I remove the button focus outline?

To remove focus around the button outline:none property is used. Outline property: Outline is an element property which draws a line around element but outside the border. It does not take space from the width of an element like border.

How do I remove the underline from a hyperlink in CSS?

By setting the text-decoration to none to remove the underline from anchor tag. Syntax: text-decoration: none; Example 1: This example sets the text-decoration property to none.


1 Answers

You can just use this:

a:active, a:focus {   outline: 0;   border: none;   -moz-outline-style: none; } 
like image 94
Nuno Bentes Avatar answered Sep 20 '22 22:09

Nuno Bentes