Categories
CSS

How to remove focus border (outline) around text/input boxes with CSS?

Spread the love

Sometimes, we want to remove focus border (outline) around text/input boxes with CSS.

In this article, we’ll look at how to remove focus border (outline) around text/input boxes with CSS.

How to remove focus border (outline) around text/input boxes with CSS?

To remove focus border (outline) around text/input boxes with CSS, we set the outline property.

For instance, we write

textarea:focus,
input:focus {
  outline: none;
}

to remove the outline when we focus on the input or textarea with outline: none;.

Conclusion

To remove focus border (outline) around text/input boxes with CSS, we set the outline property.

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 *