Menu Close

How to add outline radius to a div with CSS?

To add outline radius to a div with CSS, we add the border and border-radius propeties.

For instance, we write

<div></div>

to add a div.

Then we write

div {
  background: #999;
  height: 100px;
  width: 200px;
  border: #999 solid 1px;
  border-radius: 10px;
  margin: 15px;
  box-shadow: 0px 0px 0px 1px #fff inset;
}

to add the border-radius to make the corners rounded.

And we set the border property to the border styles to show the border with rounded corners.

Posted in CSS