css round div code example

Example 1: css rounded corners

/* Set rounded corners with border-radius property */

.class {
  border-radius: 4px;
}

.circle {
  border-radius: 50%;
}

Example 2: round div

.circle {
  border-radius: 50%;
  height: 100px;
  width: 100px;
}

Example 3: css rounded corners

/* Use border-radius property */

.class {
  border-radius: 5px;
}

.circle {
  border-radius: 50%;
}

Example 4: make span html circle css

span {
    display: block;
    height: 60px;
    width: 60px;
    line-height: 60px;

    -moz-border-radius: 30px; /* or 50% */
    border-radius: 30px; /* or 50% */

    background-color: black;
    color: white;
    text-align: center;
    font-size: 2em;
}

Example 5: how to make a circle in html

<svg xmlns="http://www.w3.org/2000/svg">
    <circle cx="50" cy="50" r="50" fill="red" />
</svg>

Example 6: css round element

/* I find it best to use pixels*/
    border-radius: 5px;

/* Percents don't work well with elements that aren't square*/
    border-radius: 10%;