Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove border around clicked button in html?

Tags:

html

css

border

I have recently started building a website and have started to make buttons on it. However, whenever I click the button, I get a blue border like this !

How should I get rid of this border? Thanks in advance!

like image 258
Sam Bates Avatar asked Mar 16 '14 10:03

Sam Bates


People also ask

How do you hide the outline of a button?

If you want to remove the focus around a button, you can use the CSS outline property. You need to set the “none” value of the outline property.

How do I remove the border after clicking a link?

Just add a:visited { outline: none; } in your style file. Save this answer. Show activity on this post.

How do I disable borders?

On the Page Layout tab, in the Page Background group, select Page Borders. In the Borders and Shading dialog box, on the Page Border tab, under Setting, choose None. Select OK.


2 Answers

Add this css to your button:

outline: none;
like image 150
Hardy Avatar answered Sep 25 '22 09:09

Hardy


Just add :

button:focus {
    outline: none;
}
like image 30
Sanjeev Avatar answered Sep 22 '22 09:09

Sanjeev