Skip to content
Home » Web » CSS » CSS Remove Focused Border

CSS Remove Focused Border

You might already notice that every time you focus on the input box, there's a incompatible border which wrap the input box. Actually, it's not a border, it's an outline. Its color is chosen by browser by default. You can remove it by modifying the CSS file in this way.

[developer@test css]# vi web.css
#name-input-box:focus {
    outline: none;

In the above code, #name-input-box is an element id and :focus is a selector belonging to said element id, which can let you style the element whenever focused.

Leave a Reply

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