How do I remove the blue border around my circular button when I click it.
Asked
Active
Viewed 5,132 times
4

luishengjie
- 187
- 6
- 15
-
6button:focus{outline :none;} – Chiller May 14 '17 at 09:09
-
@RachelGallen my apologies, did not know about the accepted answer feature. – luishengjie May 16 '17 at 06:15
2 Answers
3
In this example I have changed the border-color
from blue to transparent
and added outline:none;
on :focus
(could also add not enabled)
Hope this helps
button {width:50px;
height:50px;
background-image:url("http://www.rachelgallen.com/images/purpleflowers.jpg");
background-size:70% 70%;
background-repeat:no-repeat;
background-position:center center;
border-width:3px;
border-style: solid;
border-color:#000099;
}
button:focus{
border-color:transparent!important;
outline:none;
}
<button>
</button>

Rachel Gallen
- 27,943
- 21
- 72
- 81
-
-
@evolross your question has been asked a few times before. Check out [this answer](https://stackoverflow.com/a/11426967) and the other answers given to the corresponding question. – Rachel Gallen Jun 27 '20 at 08:11
1
Use outline
Property :
selector {
outline:none;
}
Example :
.btn {
outline: none;
}
<button class="btn">Click Me!</button>

Ehsan
- 12,655
- 3
- 25
- 44