How to create div with rounded corner ?

In this post we will learn how to create rounded corner div by using CSS below are the details.

  • Create one div
  • Add class name as “rounded
  • Add below mentioned css to “rounded” class
  • Here border-radius property is required to display rounded corner div on the page.
.rounded{
  border-radius: 25px;
  background: #CCCCCC;
  padding: 10px;
  width: 200px;
  height: 200px;
  font-family: cursive;
}
  • Add below HMTL code with class “rounded
<div class="rounded">DIV with rounded corner</div>
  • DIV will be displayed same as below.