Skip to the page
css reference · the box model

CSS border-radius

type
property
applies to
any element
inherits
no
common values
4px, 8px, 50%, 999px (a pill)

Where it goes

On the box whose corners should round. It works with or without a visible border, because the background rounds too.

Example

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
}

Common mistakes

  • Expecting a child image to round when only the parent has border-radius. The parent also needs overflow: hidden to clip its children to the curve.
  • Using 50% on a box that is not square and hoping for a circle. You get an oval. Make the width and height equal first.
  • Rounding every single box with a different value. A few consistent sizes (4px for inputs, 12px for cards) read as a system. Random values read as noise.

Related

Updated 24 October 2026. Practice it in the css route, or read more on MDN.