Categories
CSS

How to remove or disable focus border of browser with CSS?

Spread the love

Sometimes, we want to remove or disable focus border of browser with CSS.

In this article, we’ll look at how to remove or disable focus border of browser with CSS.

How to remove or disable focus border of browser with CSS?

To remove or disable focus border of browser with CSS, we select the styles for the :focus pseudo-class.

For instance, we write

:focus {
  outline: none;
}

to set the outline style to none to remove the border of the element that’s in focus.

Conclusion

To remove or disable focus border of browser with CSS, we select the styles for the :focus pseudo-class.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *