Languages
[Edit]
EN

CSS - remove border from element

0 points
Created by:
Walter
586

In this article, we would like to show you how to remove border from an element in CSS.

Quick solution:

div {
  border: none;
}

or using inline style:

<div style="border: none;"></div>

 

Preview:

CSS - remove border from element
CSS - remove border from element

Practical example

In this example, we disable an element's border by overriding it with an inline style, setting the border to none.

// ONLINE-RUNNER:browser;

<!doctype html>
<html>
<head>
  <style>

    div {
      height: 100px;
      width: 100px;
      background: yellow;
      border: 1px solid red; /* <--- border to remove */
    }

  </style>
</head>
<body>
  <div style="border: none;"></div>
</body>
</html>

Alternative titles

  1. CSS - disable border
  2. CSS - override border
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join