How to remove a border in CSS?

We often need to remove the existing border from an element. For example, the default HTML button has a default grey color border. We may sometimes have a requirment where we don’t want any border around the button.

To remove any such existing border from the element, we have to set its border property to none value. It will completely remove any existing border from the element.

Here is a working example of it:

Example:

button{
   border: none;
}

Remove individual side border from the element

You may sometimes want to remove only one side of border from the element and keep the other sides of border as it is. In that situation, you have to set only that particular side of border to none value.

Here is a working example:

Example:

button{
   border-left: none;
}

Author

  • Manoj Kumar

    Hi, My name is Manoj Kumar. I am a full-stack developer with a passion for creating robust and efficient web applications. I have hands-on experience with a diverse set of technologies, including but not limited to HTML, CSS, JavaScript, TypeScript, Angular, Node.js, Express, React, and MongoDB.

    View all posts